Fix quadratic interpolation