test-device pairing bug fix