 				.rx_didDiscoverIncludedServicesForService
 				.filter { $0.0 == service.service }
 				.flatMap { (service, error) -> Observable<[Service]> in
-					guard let includedServices = service.includedServices where error == nil else {
+					guard let includedRxServices = service.includedServices where error == nil else {
 						return Observable.error(BluetoothError.IncludedServicesDiscoveryFailed(self, error))
 					}
-					let mapped = includedServices.map { Service(peripheral: self, service: $0) }
-					guard includedServiceUUIDs != nil else { return Observable.just(mapped) }
-					return Observable
-						.just(mapped.filter { self.shouldBeIdentifierIncluded($0.UUID, forIdentifiers: includedServiceUUIDs) }) }
+					let includedServices = includedRxServices.map { Service(peripheral: self, service: $0) }
+					guard let includedServiceUUIDs = includedServiceUUIDs else { return Observable.just(includedServices) }
+                    return Observable.just(includedServices.filter { includedServiceUUIDs.contains($0.UUID) })
+
+                }
 				.take(1)
 
 			return Observable.create { observer in

			.rx_didDiscoverCharacteristicsForService
			.filter { $0.0 == service.service }
			.flatMap { (cbService, error) -> Observable<[Characteristic]> in
				guard let characteristics = cbService.characteristics where error == nil else {
					return Observable.error(BluetoothError.CharacteristicsDiscoveryFailed(service, error))
				}
				let mapped = characteristics.map { Characteristic(characteristic: $0, service: service) }
				guard identifiers != nil else { return Observable.just(mapped) }
				return Observable.just(mapped
						.filter { self.shouldBeIdentifierIncluded($0.UUID, forIdentifiers: identifiers) })
            }
			.take(1)


			.map { (self, $0) }
		return ensureValidPeripheralState(observable)
	}
}

extension Peripheral: Equatable { }
