Fix to algorithm for creating control points