Fixed handshake and Core::addPeer