Minor PWM improvements