remove duplicate menu hiding code