before deletion of subtasks