[minor] Added removing of nodes.
[fix] Only end when we have a node