fixed the menu bug when no menu is assigned