fix max iterations