Debugged the computation of maxVar

We had maxVar if only a limited number of variables were used