fixed comma trim bug in _get_terms_list