Made dispatcher sleep when waiting.