That fixed it. I thought rand() might be bassed on the time/tick of the computer and that was why multiple threads executing at the same time would generate the same number. Thanks for pointing out the problem.