fix issue with mode switching between velocity and position