fix rpc test (it could fail on slow machines)
tests: minor fixes