fixes to speedup run/plot