fix crash in log statement if c is null, ie card was not found