--- vote_up_down.module	2009-08-10 17:35:42.593500000 +0300
+++ vote_up_down_fix.module	2009-08-10 17:16:51.218500000 +0300
@@ -553,7 +553,7 @@ function vote_up_down_vote($type, $cid, 
     }
 
     // Do the voting via Voting API.
-    if ($uid = _vote_up_down_get_uid()) {
+    $uid = _vote_up_down_get_uid();
       if ($vote['value'] == 0) {
         $criteria = array('content_type' => $type, 'content_id' => $cid, 'uid' => $uid, 'tag' => $tag);
         votingapi_delete_votes(votingapi_select_votes($criteria));
@@ -566,7 +566,7 @@ function vote_up_down_vote($type, $cid, 
         $votes = array(0 => $vote);
         votingapi_set_votes($votes);
       }
-    }
+
 
     if ($ajax) {
       $style = ($alt == TRUE ? 'alt' : '');
@@ -604,6 +604,8 @@ function template_preprocess_vote_up_dow
       'uid' => _vote_up_down_get_uid(),
       'tag' => $tag,
     );
+    $criteria += votingapi_current_user_identifier();
+
     $user_vote = votingapi_select_single_vote_value($criteria);
 
     if ($user_vote > 0) {
@@ -669,6 +671,7 @@ function template_preprocess_vote_up_dow
       'uid' => _vote_up_down_get_uid(),
       'tag' => $tag,
     );
+    $criteria += votingapi_current_user_identifier();
     $user_vote = votingapi_select_single_vote_value($criteria);
 
     if ($user_vote > 0) {
@@ -758,7 +761,7 @@ function _vote_up_down_get_uid() {
   }
   elseif (variable_get('vote_up_down_anonymous_vote', 0)) {
     $long = ip2long(long2ip(ip_address()));
-    $uid = abs($long) + date('z');
+    $uid = '0';
   }
   else {
     $uid = NULL;
