Fixing the aggregate functions used in the graphs.