fix hide/show views bug