Fix connection creation for correct transactions.