fix bug for edge cases with 2 verts