Fixed wrong computation of statistics.