diff --git a/plug-ins/script-fu/tinyscheme/scheme.c b/plug-ins/script-fu/tinyscheme/scheme.c
index cd6769c..f9ea054 100644
--- a/plug-ins/script-fu/tinyscheme/scheme.c
+++ b/plug-ins/script-fu/tinyscheme/scheme.c
@@ -3542,6 +3542,7 @@ static pointer opexe_2(scheme *sc, enum scheme_opcodes op) {
      case OP_STRAPPEND: { /* string-append */
        /* in 1.29 string-append was in Scheme in init.scm but was too slow */
        int len = 0;
+       int char_cnt = 0;
        pointer newstr;
        pointer car_x;
        char *pos;
@@ -3550,10 +3551,12 @@ static pointer opexe_2(scheme *sc, enum scheme_opcodes op) {
        /* compute needed length for new string */
        for (x = sc->args; x != sc->NIL; x = cdr(x)) {
           car_x = car(x);
+          char_cnt += strlength(car_x);
           end = g_utf8_offset_to_pointer(strvalue(car_x), (long)strlength(car_x));
           len += end - strvalue(car_x);
        }
        newstr = mk_empty_string(sc, len, ' ');
+       strlength(newstr) = char_cnt;
 
        /* store the contents of the argument strings into the new string */
        pos = strvalue(newstr);
@@ -3600,6 +3603,7 @@ static pointer opexe_2(scheme *sc, enum scheme_opcodes op) {
           x=mk_empty_string(sc,len,' ');
           memcpy(strvalue(x),beg,len);
           strvalue(x)[len] = '\0';
+          strlength(x) = index1 - index0;
 
           s_return(sc,x);
      }
