After beating my head against a wall, I finally got the cancel button to work.