#1 fixed encoding bug