 
         let diff = Date().timeIntervalSince(self.currentStepFlags["checkTargetDeviceGotConnectedStartTime"] as! Date)
         if (diff > MeshSetup.deviceConnectToCloudTimeout) {
+            self.currentStepFlags["checkTargetDeviceGotConnectedStartTime"] = nil
             self.fail(withReason: .DeviceConnectToCloudTimeout)
             return
         }


        let diff = Date().timeIntervalSince(self.currentStepFlags["checkDeviceHasIPStartTime"] as! Date)
        if (diff > MeshSetup.deviceObtainedIPTimeout) {
            self.fail(withReason: .FailedToObtainIp)
            return
        }

    //MARK: EnsureDeviceCanBeClaimed
    private func stepEnsureTargetDeviceCanBeClaimed() {
        self.targetDevice.transceiver!.sendGetDeviceId { result, deviceId in
            self.log("targetDevice.didReceiveDeviceIdReply: \(result), deviceId: \(deviceId as Optional)")
            if (result == .NONE) {
                self.targetDevice.deviceId = deviceId!
                self.checkTargetDeviceIsClaimed()
