Temporary fix for res->thread change