num iteration fix