fixed the IO error for starting pwm multiple times