fixed a bug with items not being hidden