A circuit for discharging stored energy in an electrosurgical generator. The circuit includes a pulse width modulator for controlling a high voltage power supply, an error signal generating circuit configured for delivering an error signal as a difference between an output signal voltage with a feedback voltage generated by the high voltage power supply. The error signal is transmitted to the pulse width modulator. The circuit further includes a switching circuit configured to switch in a load in parallel with an output of the high voltage power supply when the error signal is lesser than a first predetermined threshold to discharge the output.