fix scope issues involving fieldsexpose and other destructureing pattern fix trace to extract string from term.