fixed the statistics based on new JSON api