fix aggregates in case of no aggregation variables