fixed bug in updating menu item