fix last vertex in path