Ends the current transaction.