expandArrayList without segdefault