fixed a bug that missed dead connections when sweeping