fixed id generation for new nodes.