Do not crash in statistics module
Merge pull request #302 from l0ud/stats

Do not crash in statistics module