Fix bug when retrieving the end index of an edge.