ArrayList fixes for speedup