correct core/thread detection