fixed return statement agg