fix a show/hide bug