Updated PWM module to handle weird clock issue. Works fine when using the debugger...