Bugfix in statistics