Fixed a bug in the steps generation and bezier curve creation