Forgot to see if script was running in background before checking cancelled dialog.