fix client-side card handling