     
     public func peripheralManagerDidUpdateState(peripheral: CBPeripheralManager!) {
         
+        waitingForBluetooth = false
         detectAndCallback()
     }
 

        }
    }
    
    
    public func statusBluetooth() -> PermissionStatus{
        let askedBluetooth = NSUserDefaults.standardUserDefaults().boolForKey(PermissionScopeConstants.requestedForBluetooth)
        
        // if already asked for bluetooth before, do a request to get status, else wait for user to request
        if askedBluetooth{
            triggerBluetoothStatusUpdate()

        assert(configuredPermissions.filter { $0.type == config.type }.isEmpty, "Permission for \(config.type.stringValue()) already set")
        
        configuredPermissions.append(config)
        
        if config.type == .Bluetooth && askedBluetooth {
            triggerBluetoothStatusUpdate()
        }
    }

    func permissionStyledButton(type: PermissionType) -> UIButton {
