fix bug: edge judgement