fixed encoding bug
merged