handling card failures gracefully