Fixed up thread_init()