fixed card_reference bug (but not all the bad data yet)