minor changes in tracegen code