fixed error with RPC call not working