Fix bug with badly formatted strings.