Update hide and show.

Updated hide and show to only act if currently shown/hidden.