Fixing a small bug in the filling of the histogram