fixed bug with all_named_terms