encoding bug fixed HARD