fix bug when deleting an item without images