fixed a bug in RPCEngine