Fix to the delete method