Fix previous commit that uses DB aggregations