Fix selection of # threads, set default to 1 thread