menubar state handling improvements