Fixed a bug in menu panel