changed type for nMutexTimeout from int to unsigned int