Fixes several mistakes from the new RPC improvements