Correct a bug in the card layout