only concatenate when replacing a character