Converted threadId from integer to long.

Converted threadId from integer to long before it's too late...