Fixed to use treeAggregate