--- binary.inc	2009-09-18 17:04:57.000000000 -0700
+++ binary.inc.new	2009-09-18 17:06:22.000000000 -0700
@@ -167,11 +167,7 @@ function advpoll_view_results_binary($no
 }
 
 function advpoll_calculate_results_binary(&$cache, $node) {
-  $result = db_query('SELECT uid, vote_source FROM {votingapi_vote} WHERE content_type = "advpoll" AND content_id = %d AND value_type = "option" GROUP BY uid, vote_source, timestamp', $node->nid);
-  $total_votes = 0;
-  while ($vote = db_fetch_object($result)) {
-    $total_votes++;
-  }
+  $total_votes = db_result(db_query('SELECT COUNT(uid) FROM {votingapi_vote} WHERE content_type = "advpoll" AND content_id = %d AND value_type = "option"', $node->nid));
   votingapi_add_results(array(array('content_type' => 'advpoll', 'content_id' => $node->nid, 'value_type' => '', 'tag' => '_advpoll', 'function' => 'total_votes', 'value' => $total_votes)));
 }
 
