Fixing a histogram bug