correct encoding bug