Added support for error substates