Fixed extended encoding bug