Fixing addNode()