Fixed degenerate nodes case.