ported the hung scheduler fix to 2.0.x branch. This is a temporary stopgap until the scheduler and state machine can be rewritten