fixed the segment histograms