make sure the thread pointer is null after the thread has been shut down