Ensure tool transaction is thread safe
Merge pull request #840 from lodle/crashfixes

Ensure tool transaction is thread safe