Fixed a bug with an if clause in CardElement