Correcting how to set num threads