Fix array iteration