Handle dispatch suspend/resume slightly better.
Merge pull request #983 from unknownbrackets/scheduling

Handle dispatch suspend/resume slightly better