Added code to implement the delete-during handling.