Fix bug in aggregation.