Runner bugfixes

The runner would previously crash with most scenarios (and whenever -trace_stat was specified). These issues have been fixed here.