Bugfix in histogram