diff --git "a/C:\\Users\\ToddSpear\\Downloads\\commerce_addressbook-7.x-1.x-dev\\commerce_addressbook\\commerce_addressbook.old.module" "b/C:\\Users\\ToddSpear\\Downloads\\commerce_addressbook-7.x-1.x-dev\\commerce_addressbook\\commerce_addressbook.module"
index 64a6408..dc16865 100644
--- "a/C:\\Users\\ToddSpear\\Downloads\\commerce_addressbook-7.x-1.x-dev\\commerce_addressbook\\commerce_addressbook.old.module"
+++ "b/C:\\Users\\ToddSpear\\Downloads\\commerce_addressbook-7.x-1.x-dev\\commerce_addressbook\\commerce_addressbook.module"
@@ -130,7 +130,7 @@ function commerce_addressbook_field_widget_form(&$form, &$form_state, $field, $i
           }
         }
         // Otherwise try to get it from the $items array.
-        else if (isset($items[$delta]['saved_address_profiles'])){
+        elseif (isset($items[$delta]['saved_address_profiles'])) {
           $default = $items[$delta]['saved_address_profiles'];
         }
 
@@ -139,7 +139,7 @@ function commerce_addressbook_field_widget_form(&$form, &$form_state, $field, $i
           '#access' => user_is_logged_in(),
           '#attributes' => array('class' => array('edit-commerce-addressbook-saved-address-profiles'), 'title' => '', 'rel' => ''),
           '#type' => 'select',
-          '#title' => $element['#title'],
+          '#title' => filter_xss($element['#title']),
           '#options' => $options,
           '#default_value' => $default,
           '#required' => FALSE,
@@ -160,7 +160,7 @@ function commerce_addressbook_field_widget_form(&$form, &$form_state, $field, $i
         // @TODO: what should we do here?
         $element['saved_address_profiles'] = array(
           '#type' => 'markup',
-          '#value'=> '',
+          '#value' => '',
         );
       }
       break;
@@ -487,10 +487,14 @@ function commerce_addressbook_get_saved_addresses($uid) {
         ->entityCondition('entity_type', $entity_type)
         ->entityCondition('bundle', $bundle_names, 'IN')
         ->propertyCondition('status', 1)
-        ->propertyCondition('uid', $uid)
-        ->propertyOrderBy('profile_id', 'DESC');
-      $result = $query->execute();
+        ->propertyCondition('uid', $uid);
 
+      // Only sort using fields from known sources!
+      if ($entity_type == 'commerce_customer_profile') {
+        $query->propertyOrderBy('profile_id', 'DESC');
+      }
+      $result = $query->execute();
+ 
       // $result contains entity objects with the current entity_type and one of the selected bundles
       if (!empty($result[$entity_type])) {
         $entity_profiles = entity_load($entity_type, array_keys($result[$entity_type]));
@@ -550,7 +554,10 @@ function commerce_addressbook_get_bundles_with_field($field_type = 'addressfield
             foreach ($bundles as $bundle_name) {
               // @TODO: support the case where there are multiple addressfields for one bundle
               // Although that's probably not that common
+              // Only add 'billing' addresses
+              if ($bundle_name=='billing') {
               $result[$entity_type][$bundle_name] = $field['field_name'];
+              }
             }
           }
         }
@@ -559,4 +566,4 @@ function commerce_addressbook_get_bundles_with_field($field_type = 'addressfield
   }
 
   return $result;
-}
+}
\ No newline at end of file
