Fixed show/hide

fixed the show/hide function