changes made for preventing flickering menu items