Fix limit calculation.