This paper proposes a dual mode extremum-seeking controller (ESC) design based on a Lie bracket averaging technique. The stability analysis demonstrates that the practical asymptotical stability of the unknown optimum can be achieved for autonomous and non-autonomous systems. The application of the technique for the solution of realtime optimization problem with time-varying optimum state trajectories is presented. A simulation study demonstrates the ability of the proposed technique to remove the input bias that results in the application of existing Lie bracket design techniques to dynamical control systems.