added a line to prevent loitering when deleting