fixed checking of the thread creation.