Fixed an encoding bug.