Fix menu hiding logic

Change-Id: Ib98197a27a4b50d76dc3385d12e70e3de10d35d7