fixed bug with deleting items twice