don't let the thread crash!