fix bug where card_id is not being saved to DB