Fix error when editing a node.