Fix the aggregation bug.