Infinite loop after set of default hide mode