Fix some bugs in EdgeLink().