Bug Fix: thread scheduling error when affinity not provided, now fixed