Fixed bugs in histogrammer