Fixed bug with deleting items