Correctly merge nodes instead of overriding