Code client, fix encoding bug