Corrected some problems with the histogram.

Signed-off-by: aywu <aywu477@gmail.com>