Fix for #454: Sleep properly rather than spinning CPU.