Fix the histogram algoritm generation. With the normalization of the max height elemnets. My bad