re-correct node indices