fix trailing slices of UTF-8 strings.