fix traces for expressions and keypathexpressions