Fix the cancel bug.