Fixed iterating over an array using for .. in loop.