We didn't properly remove the default cancellation handler, which would cause crashes if the dialog was gone too early.