Update menu and fixed some bugs