Fixed Perpendicular Warning in case of the first and last Coordinate
being the same.