bugfix when making interpolation function using interp2d