fix iteration generation