fix glaring encoder bug