             central.stopScan()
             log("stop scan")
 
-            scanTimeoutWorker.cancel()
+            if let worker = scanTimeoutWorker {
+                worker.cancel()
+                scanTimeoutWorker = nil
+            }
 
             if RSSI.int32Value < -90  {
                 self.log("Device too far.. sent warning to user")

    private var peripheralToConnectCredentials: MeshSetupPeripheralCredentials?
    private var peripheralToConnect: CBPeripheral?

    private lazy var scanTimeoutWorker: DispatchWorkItem  = DispatchWorkItem() {
        [weak self] in

        if let sSelf = self {
            sSelf.centralManager.stopScan()
            sSelf.fail(withReason: .FailedToScanBecauseOfTimeout, severity: .Error)
            if (sSelf.state != .Disabled) {
                sSelf.state = .Ready
            }

        }
    }

    required init(delegate: MeshSetupBluetoothConnectionManagerDelegate) {
        let centralQueue = DispatchQueue(label: "io.particle.mesh", attributes: [])

        let options: NSDictionary = NSDictionary(objects: [NSNumber(value: true as Bool)], forKeys: [CBCentralManagerScanOptionAllowDuplicatesKey as NSCopying])
        self.centralManager.scanForPeripherals(withServices: [MeshSetup.particleMeshServiceUUID], options: options as? [String: AnyObject]) // []

        if let worker = scanTimeoutWorker {
            worker.cancel()
            scanTimeoutWorker = nil
        }

        scanTimeoutWorker = scanTimeoutWorkerFactory
        DispatchQueue.main.asyncAfter(deadline: DispatchTime.now() + MeshSetup.bluetoothScanTimeoutValue,
                execute: scanTimeoutWorker!)
    }

    func dropConnection(with connection: MeshSetupBluetoothConnection) {
