Fixes show/hide bug