Fixed spurious end nodes
Fixed spurious nodes