fixed drawEdges()