encoder fix