Minor improvement to menu bar control code
Merge pull request #251 from VladimirTechMan/improve_menubar_control_code

Minor improvement to menu bar control code