Fix bug in histogram filling..
Fix bug in histogram filling (final).