Fix cancel flag