Problem with incremental rotary encoder