Next time you want to end a thread, do so by closing it instead of deleting it.