correction: delete invalid edge when we construct new activeplan