replace_chars stops at end of string rather than one character later