trying to fix encoding bug