fixed the aggregation by dimension - fixes #843046