small fixes for rpc protocol