Fixed integer math error in interpolation step