fixed bugs on popup menus