Fixed an error in stats.