Fix problems
Merge pull request #161 from mattgu74/stats

Fix problems