Fix exception raised from stats page.
Stats tweaks.