solve an encoding bug