Corrected the calculation of the cumulative sum of the reverse histogram.