minor changes to resample_grid()