fix error in histogram printing