Fix indexOf parameter bug

Parameter for Arrary.indexOf should be the value of the element, not the index of the element.