fix iteration variables to get transient name which is the index of the array