Fix show/hide logic