fix for transactions going out of scope