Motor driver fixes; PWM management