Added the proper generation of coordinates when the starting and ending x coordinates are the same