minor bugfix in menu show/hide logic