Adding templates NS to replacements