Trying to fix chain
Put initialization in init_thread