Correct encoding bug