fixed the rotary encoder