fix binning problem in case of ROI