fixed UTF8 handling