Improve event deletion when deleting a scheduler