Fixed the hide show bugs