fixed issue when adding edges and loops to an adjacency list graph