fix arraylist first to array[0]

the implementation ArrayList.first was considering always array[length], it should be array[0]