Fix PWM input, it is now tested to work.