Error checking fix to prevent access to an empty array list.