make aggregation work with new shapefile logic.