solve a small issue with replacements