Fix MenuBar's class refactoring issue.