Fix bug creating new nodes.