Fixed an error in library stats.