Fixed inconsistent data issue with replaceNode