Fix bug in histogram.