Fix Registration Failure When A Peer And TLS Are Used