fixed bug in createManyThreads.cpp