Added support for failed flag