fix bug in saving after deleting item