Use visibilty instead of show/hide and it works