Aspects of the disclosure provide an uninterruptible power supply comprising an input configured to receive input power from an input-power source, the input having a mains neutral connection coupled to a reference node, an energy-storage-device interface configured to be coupled to an energy-storage device to provide back-up power, the energy-storage-device interface having an energy-storage-device neutral connection coupled to the reference node, an output configured to provide output power derived from at least one of the input power and the back-up power, a power-factor-correction circuit (PFC) comprising a PFC input, a capacitor coupled to the PFC and being galvanically coupled to the energy-storage-device interface, a bidirectional converter coupled to the input and coupled to the energy-storage-device interface, and a switch coupled to the energy-storage-device interface and to the PFC input.