Fix crash on delete card when there is no card record