fixed some bugs in the menu