fix total summation in aggregation