Fixed bug in hist plotter