fix duplicate nodes