Fix a bug related to StringFormatException.