fixed arraylist out of bound