ArrayIndexOutOfBound exceptions defeated