fixes for the grid binning