not quite working yet, but closer
fix a few infinitely looping RPCs