C version of PWM seems to work properly. Python PWM now extends C PWM.