fixed menubar flashing when redrawn