Set up stub connection with server and fix bug in RemoteObjectReference.