Make the stats access event listener trigger before the stats is generated. Fixes #251
Merge pull request #251 from christeredvartsen/issue-251

Stats access is verified after stats have been generated