Fix statistic calculation.