Fixed a bug on gettid when not running.