Fixes issue where code was attempting to iterate over an array using for/in syntax.