Fixed parsing of the threads option