Fix arrayindexoutofbounds