Fixed ArrayIndexOutofBoundException