Improved PWM timing