Fixes duplicated node id issue.