Fix possible assert in the card edit.