fix compilation error due to array to arraylist