fix some rpc issues