Fixed ArrayIndexOutOfBoundsEzception