Assign the thread properly.