thread id getter fix