fix bilinear interpolation