Fixed enumerable iteration

fixes issue that happens when the Array prototype has been extended