Fixed bug if array list was less than 1.