fix rebin for 2D