FIx bug in removal of nodes.