pwm2 bug fix