Solved addEdge problem with temporary fixes