Fixed stats NullPointerException bug

Issue #92 fixed