fixed bug encoding is always true no matter what was specified