Fixing statistics NPE