Transactions bug fix