bug fix in menu hiding