fix a bug in rpc client