Fix pwm initialization issue