Fixed arrayindexoutofbounds