fixed pairing bug