made thread ids unsigned again, to avoid negative thread ids on some systems