fix connection close