made gui unit menus more robust to user input