Fixing node relationships