added logic to propagate application failure to the AM un-registration