fixed hiding of wrong element