Fixed a bug with deleting menu items