Improving PWM handling;