Maintain state when a task is deleted.