fix binning bug