diff --git a/userpoints.admin.inc b/userpoints.admin.inc
index fc2e73d..42c34e6 100644
--- a/userpoints.admin.inc
+++ b/userpoints.admin.inc
@@ -391,12 +391,14 @@ function userpoints_admin_points($form, &$form_state) {
     ->groupBy('u.name')
     ->groupBy('p.points')
     ->groupBy('p.tid')
-    ->groupBy('t.name')
     ->orderByHeader($header)
     ->limit(variable_get(USERPOINTS_REPORT_USERCOUNT, 30));
 
   $query->join('users', 'u', 'p.uid = u.uid');
-  $query->leftJoin('taxonomy_term_data', 't', 'p.tid = t.tid');
+  if (module_exists('taxonomy')) {
+    $query->groupBy('t.name');
+    $query->leftJoin('taxonomy_term_data', 't', 'p.tid = t.tid');
+  }
 
   $values = userpoints_filter_parse_input($form_state);
   $active_category = userpoints_filter_query($query, $values);
@@ -463,7 +465,9 @@ function userpoints_admin_transactions($form, &$form_state, $moderate) {
     $query->condition('p.status', USERPOINTS_TXN_STATUS_PENDING);
   }
 
-  $query->leftJoin('taxonomy_term_data', 't', 'p.tid = t.tid');
+  if (module_exists('taxonomy')) {
+    $query->leftJoin('taxonomy_term_data', 't', 'p.tid = t.tid');
+  }
 
   $values = userpoints_filter_parse_input($form_state);
   $active_category = userpoints_filter_query($query, $values);
diff --git a/userpoints.install b/userpoints.install
index 7b84de3..b60a4a7 100644
--- a/userpoints.install
+++ b/userpoints.install
@@ -180,7 +180,7 @@ function userpoints_uninstall() {
     ->execute();
 
   $vid = db_query("SELECT vid FROM {taxonomy_vocabulary} WHERE module='userpoints'")->fetchField();
-  if ($vid) {
+  if ($vid && function_exists('taxonomy_vocabulary_delete')) {
     taxonomy_vocabulary_delete($vid);
   }
 }
diff --git a/userpoints.module b/userpoints.module
index 9b3b186..ba40af1 100644
--- a/userpoints.module
+++ b/userpoints.module
@@ -571,7 +571,7 @@ function userpoints_tokens($type, $tokens, array $data = array(), array $options
           break;
 
         case 'tid':
-          if ($txn->tid > 0) {
+          if (module_exists('taxonomy') && $txn->tid > 0) {
             $term = taxonomy_term_load($txn->tid);
             $term_name = $term ? $term->name : '';
           }
@@ -587,7 +587,7 @@ function userpoints_tokens($type, $tokens, array $data = array(), array $options
       $replacements += token_generate('user', $user_tokens, array('user' => user_load($txn->uid)), $options);
     }
 
-    if ($term_tokens = token_find_with_prefix($tokens, 'tid')) {
+    if (module_exists('taxonomy') && $term_tokens = token_find_with_prefix($tokens, 'tid')) {
       if ($txn->tid > 0) {
         $replacements += token_generate('term', $term_tokens, array('term' => taxonomy_term_load($txn->tid)), $options);
       }
diff --git a/userpoints.pages.inc b/userpoints.pages.inc
index 9340d7c..c711ef5 100644
--- a/userpoints.pages.inc
+++ b/userpoints.pages.inc
@@ -42,7 +42,9 @@ function userpoints_list_transactions($form, &$form_state, $account = NULL, $tid
     ->orderBy('p.txn_id', 'DESC')
     ->limit(variable_get(USERPOINTS_REPORT_LIMIT, 10));
 
-  $query->leftJoin('taxonomy_term_data', 't', 'p.tid = t.tid');
+  if (module_exists('taxonomy')) {
+    $query->leftJoin('taxonomy_term_data', 't', 'p.tid = t.tid');
+  }
 
   $unapproved_query = db_select('userpoints_txn', 'p')
     ->condition('uid', $account->uid)
@@ -153,12 +155,14 @@ function userpoints_list_users($form, &$form_state, $tid = NULL) {
     ->groupBy('u.name')
     ->groupBy('p.points')
     ->groupBy('p.tid')
-    ->groupBy('t.name')
     ->orderByHeader($header)
     ->limit(variable_get(USERPOINTS_REPORT_USERCOUNT, 30));
 
   $query->join('users', 'u', 'p.uid = u.uid');
-  $query->leftJoin('taxonomy_term_data', 't', 'p.tid = t.tid');
+  if (module_exists('taxonomy')) {
+    $query->groupBy('t.name');
+    $query->leftJoin('taxonomy_term_data', 't', 'p.tid = t.tid');
+  }
 
   $values = userpoints_filter_parse_input($form_state, $tid);
   $active_category = userpoints_filter_query($query, $values);
