Fixing connection leak at termination