bug fix: max iterations