delete bad nodes