Corrected steps to compute representation histograms.