fixed bug for creating utf8 summary (thanks valgrind)