Encoding bug fixed