fix connecting with empty list issue