Fixes to schedule module and state for error conditions.

Fixes to schedule module and state for error conditions. #13702