fixed show/hide bug