small mods to thread deletion