Fixed issue with bezier curve

Fixed issue where the bezier curve used to be deactivated if 3 points
with the same value were following each other.
See issue #73.