Modified to check all cores.