fixed a bug in solveNextEdgeComm()