Change to GetCurrentThreadID; FPC bug was fixed.