UTF-8 encoding bug fix