Added ability to cancel flag