fix calculation of interpolated values