Fix connection close