fix if list length is 0