A few more bug fixes in route handling and in the stats collector
to make everything run in the simulator.