Added support for half-cycle correction and applied correction in simulation run.