fixed bug in pwm thread