Fix node level assignment bug.