Fix using the new task scheduler causing lots of CPU to be used.