Fix groupBy with histograms

license header