fix for empty sets of terms