Fix weird encoding bug