diff --git a/commerce_cardonfile/commerce_cardonfile.module b/commerce_cardonfile/commerce_cardonfile.module
index 07e6328..b809a94 100644
--- a/commerce_cardonfile/commerce_cardonfile.module
+++ b/commerce_cardonfile/commerce_cardonfile.module
@@ -553,6 +553,7 @@ function commerce_cardonfile_form_alter(&$form, &$form_state, $form_id) {
 
   }
 
+  if (!user_is_anonymous()) {
   // Load existing active cards for the payment method instance and user.
   $stored_cards = commerce_cardonfile_load_multiple_by_uid($form_state['account']->uid, $payment_method['instance_id']);
 
@@ -607,7 +608,7 @@ function commerce_cardonfile_form_alter(&$form, &$form_state, $form_id) {
         $form['commerce_payment']['payment_method']['#attached']['css'][] = drupal_get_path('module', 'commerce_cardonfile') . '/theme/commerce_cardonfile.checkout.css';
       }
     }
-
+  }
     // If the current value for the card selection element is not to use
     // a different credit card, then hide the credit card form elements.
     if (empty($form_state['values']['commerce_payment']['payment_details']['cardonfile']) || $form_state['values']['commerce_payment']['payment_details']['cardonfile'] !== 'new') {
