removes duplication of string when placeholder is incorrect