The dependence of the criterion of beam focusing on the number of base modes used for wavefront control is numerically analyzed. The maximum degree of compensation for thermal blooming is found to depend on the product of the path length and the nonlinearity parameter. The relative contribution of the third– and fourth–order modes increases for short path lengths.