fixed encoding bug in proxy