arrayindexoutofbounds fix