Merge "Fix the null cardId issue when card is null." into pi-dev