fix bug in handleRpcRequest