Fix a bug with thread indice and read numThreads,delay parameters from commandline