fix bug in controller logic to switch motors to PWM control