Curve points out of range fix