Fix to delete thread object when finished.