make threads self deleting in a way that works.