fix has_thread