Bezier curve endpoints bugfix