This should always be triggered after error, should add an assert to ensure that functionality.