fixed discoveredPeripherals bug