Fixed bug with removeAllEdges and removeAllVertices