Fixed bug on aggregates.