groupBy fixes