Better RPC wait mechanism