Updated removeNode.