Make pairing atomic