Fixed the runtime error when deleting tasker