fix case of empty list