fix character encoding bug