diff --git a/includes/tablesort.inc b/includes/tablesort.inc
index 0ba06f1960302dd03024b47eecfbf9847d859510..04085864344b0ef0354fb1568e30dbc2e57440d7 100644
--- a/includes/tablesort.inc
+++ b/includes/tablesort.inc
@@ -71,7 +71,7 @@ function tablesort_get_order($headers) {
   }
   else {
     // The first column specified is initial 'order by' field unless otherwise specified
-    $first = reset($header);
+    $first = reset($headers);
     return $first['data'];
   }
 }