fix issue if array contains prototype extensions

attempt 1