correctly handle the failed state