Photovoltaic grid-connected converters usually embed a high-frequency or a line transformer, which guarantees galvanic isolation between the photovoltaic field and the mains. In order to increase efficiency and reduce the total cost of the system, the transformer has been removed, and special topologies of converter have been studied in order to limit the ground leakage current that arises with the galvanic connection. In fact, the parasitic capacitance between the photovoltaic cells and the metallic frame of the panel allows high ground leakage current (i.e. common mode current) to be injected into the grid. Actual solutions rely heavily on the symmetry of the system to address the problem. This paper presents a novel strategy to compensate for non-ideal switching behavior of power devices, which is immune to layout asymmetries and tolerance of parameters. Simulation results show the feasibility of the proposed solution.