Aggregate setup after type inference improved