fixed the selection process for menus