tweaked locking in GetTransaction