Fix aggregates #2271