fix RemoteConnection::serialize/deserialize(buffer)