back to without changing flattenTerms