fix for rotary encoder