Several tweaks to the scheduler to get it to be more reliable.