remove error edges