 
     //MARK: Flow control
     private func runCurrentStep() {
+        if (self.canceled) {
+            return
+        }
+
         log("stepComplete\n\n" +
                 "--------------------------------------------------------------------------------------------\n" +
                 "currentStep = \(currentStep), currentCommand = \(currentCommand)")

    private func stepResetSetupAndNetwork() {
        self.targetDevice.transceiver!.sendLeaveNetwork () { result in
            self.log("targetDevice.sendLeaveNetwork: \(result.description())")
            if (result == .NONE) {
                self.setSetupNotDone()
            } else {

    private func stopCommissionerListening() {
        self.commissionerDevice!.transceiver!.sendStopListening { result in
            self.log("commissionerDevice.sendStopListening: \(result.description())")
            if (self.canceled) {
                return
            }
            if (result == .NONE) {
                self.stopTargetDeviceListening(onComplete: self.stepComplete)
            } else {
