Fixed restrict()

Control_points were being modified through the iteration. A new variable is been added to fix that.