How to set hide condition properly?