fix a problem with killed tcp connections