cleanup dead nodes