fix for deleted threads