         ]
         return AsyncThrowingStream(ScanData<Peripheral, Advertisement>.self, bufferingPolicy: .bufferingNewest(100)) {  [weak self] continuation in
             guard let self = self else { return }
-            self.queue.async {
+            self.async {
                 // cancel old scanning task
                 if let oldContinuation = self.continuation.scan {
                     oldContinuation.finish(throwing: CancellationError())

    
    public let didDisconnect: AsyncStream<Peripheral>
    
    public func peripherals() async -> Set<Peripheral> {
        return await withUnsafeContinuation { [weak self] continuation in
            guard let self = self else { return }
            self.queue.async {
                let peripherals = Set(self.cache.peripherals.keys)
                continuation.resume(returning: peripherals)
            }

    ) async throws {
        return try await withCheckedThrowingContinuation { [weak self] continuation in
            guard let self = self else { return }
            self.async {
                let peripheral = characteristic.peripheral
                // get peripheral
                guard let peripheralObject = self.cache.peripherals[peripheral] else {
