debugging pwm weirdness