num_threads fix