master #14 fix bug in aggregation