diff --git a/uc_order/uc_order.admin.inc b/uc_order/uc_order.admin.inc
index 88bd17e..964e531 100644
--- a/uc_order/uc_order.admin.inc
+++ b/uc_order/uc_order.admin.inc
@@ -434,8 +434,7 @@ function uc_order_admin($sql = NULL, $args = NULL, $search = FALSE) {
   if (is_null($sql)) {
     $args = array();
     $show_status = 1;
-    $sql = 'SELECT o.order_id, o.uid, o.billing_first_name, o.billing_last_name, o.order_total, o.order_status, o.created, os.title '
-          .'FROM {uc_orders} o LEFT JOIN {uc_order_statuses} os ON o.order_status = os.order_status_id ';
+    $sql = 'SELECT o.order_id FROM {uc_orders} o ';
 
 
     if (arg(3) == 'sort' && !is_null(arg(4))) {
@@ -456,13 +455,6 @@ function uc_order_admin($sql = NULL, $args = NULL, $search = FALSE) {
   }
 
   $address = variable_get('uc_customer_list_address', 'billing');
-  if ($address == 'shipping') {
-      $sql = str_replace('billing', 'delivery', $sql);
-  }
-  else {
-    $address = 'billing';
-  }
-
   $context = array(
     'revision' => 'themed-original',
     'type' => 'amount',
@@ -471,7 +463,10 @@ function uc_order_admin($sql = NULL, $args = NULL, $search = FALSE) {
   $rows = array();
 
   $result = pager_query($sql, variable_get('uc_order_number_displayed', 30), 0, NULL, $args);
-  while ($order = db_fetch_object($result)) {
+  while ($row = db_fetch_object($result)) {
+    $order = uc_order_load($row->order_id);
+    $context['subject']['order'] = &$order;
+
     if ($address == 'shipping') {
       $order_name = $order->delivery_first_name .' '. $order->delivery_last_name;
     }
@@ -737,9 +732,8 @@ function uc_order_usearch() {
       $args[] = $end_date;
     }
 
-    $sql = 'SELECT o.order_id, o.billing_first_name, o.billing_last_name, o.order_total, '
-          .'o.order_status, o.created, os.title FROM {uc_orders} o LEFT JOIN {uc_order_statuses} os '
-          .'ON o.order_status = os.order_status_id WHERE o.order_status NOT IN '. uc_order_status_list('specific', TRUE)
+    $sql = 'SELECT o.order_id FROM {uc_orders} o '
+          .'WHERE o.order_status NOT IN '. uc_order_status_list('specific', TRUE)
          . $where .' ORDER BY o.created DESC';
 
     $output .= uc_order_admin($sql, $args, TRUE);
@@ -1018,10 +1012,11 @@ function uc_order_history($user) {
     'type' => 'amount',
   );
 
-  $result = pager_query("SELECT o.order_id, o.created, os.title, SUM(op.qty) AS products, o.order_total AS total FROM {uc_orders} AS o LEFT JOIN {uc_order_statuses} AS os ON o.order_status = os.order_status_id LEFT JOIN {uc_order_products} AS op ON o.order_id = op.order_id WHERE o.uid = %d AND o.order_status IN ". uc_order_status_list('general', TRUE) ." GROUP BY o.order_id, o.created, os.title, o.order_total". tablesort_sql($header), 20, 0, "SELECT COUNT(*) FROM {uc_orders} WHERE uid = %d AND order_status NOT IN ". uc_order_status_list('specific', TRUE), $user->uid);
+  $result = pager_query("SELECT o.order_id FROM {uc_orders} o WHERE o.uid = %d AND o.order_status IN ". uc_order_status_list('general', TRUE) ." ". tablesort_sql($header), 20, 0, NULL, $user->uid);
 
   // Build a table based on the customer's orders.
-  while ($order = db_fetch_object($result)) {
+  while ($row = db_fetch_object($result)) {
+    $order = uc_order_load($row->order_id);
     $context['subject'] = array('order' => $order);
 
     $link = l($order->order_id, 'user/'. $user->uid .'/order/'. $order->order_id);
@@ -1034,8 +1029,8 @@ function uc_order_history($user) {
       array('data' => format_date($order->created, 'custom', variable_get('uc_date_format_default', 'm/d/Y'))),
       array('data' => $link, 'nowrap' => 'nowrap'),
       array('data' => check_plain($order->title)),
-      array('data' => (!is_null($order->products) ? $order->products : 0), 'align' => 'center'),
-      array('data' => uc_price($order->total, $context), 'align' => 'right'),
+      array('data' => count($order->products), 'align' => 'center'),
+      array('data' => uc_price($order->order_total, $context), 'align' => 'right'),
     );
   }
 
