Fixed incorrect encoder readings