Fixed connection leak with transactions