Slight improvements for rpc