Fix bug: process term set when term set is not null.