Fixed refactoryzation bug against menu panel.