Fix the PWM overflow issue