Bugfix: optimized code to use MUCH less memory when loading stats.