fixing tokenized replacements