moved the statement that changes a DB inside the transaction.