fixed aggregation in DBAdapter