fixed the error within for-loops over vertex->edges