fixed getEdges() bug