[#197] Correct encoding bug