PWM correction to avoid use "inverted" value. PWM now works perfectly.