--- Base (BASE)
+++ Locally Modified (Based On LOCAL)
@@ -1078,16 +1078,14 @@
         $node->nid, $field_table, $field_name, $item['runtime'], $item['active'], $key);
       // handling publishing option
       // it is publising
-      if (!isset($items['group'])) {
-        $coices = $items;
+      $choices = isset($item['group']) ? $item['group'] : $item;
+      foreach ($choices as $delta => $choice) {
+        if (empty($choice['choice'])) {
+          unset($items[$key]['group'][$delta]);
+        } else {
+          $total_votes += (int) $choice['votes'];
       }
-      else {
-        $coices = $items['group'];
       }
-
-      foreach ($coices as $delta => $group) {
-        $total_votes = $total_votes+$items[$key]['group'][$delta]['votes'];
-      }
 			//delete votes if it set in edit field
       if ($item['delete_votes']==1){
 				db_query("DELETE FROM {pollfield_votes} WHERE nid = %d
@@ -1102,18 +1100,18 @@
       // for publishing and not publishing
       if (isset($items[$key]['group'])) {
         $s = serialize($items[$key]['group']);
-        $poll_fetures = serialize($items[$key]['poll_features']);
+        $poll_features = serialize($items[$key]['poll_features']);
       }
       else {
         $s = $items[$key]['choice'];
-        $poll_fetures = $items[$key]['poll_features'];
+        $poll_features = $items[$key]['poll_features'];
       }
       $node->{$field['field_name']}[$key]['choice'] = $s;
       $items[$key]['choice'] = $s;
       $items[$key]['votes'] = $total_votes;
       // adding poll features
-      $items[$key]['poll_features'] = $poll_fetures;
-      $item['nid_poll'] = $node->nid;
+      $items[$key]['poll_features'] = $poll_features;
+      $items[$key]['nid_poll'] = $node->nid;
     }
     break;
   // poll choices
@@ -1128,21 +1126,22 @@
       db_query("INSERT INTO {pollfield} (nid, field_table, field_name, runtime, active, field_name_delta) VALUES (%d, '%s', '%s', %d, %d, %d)",
         $node->nid, $field_table, $field_name, $item['runtime'], $item['active'], $key);
       if (!empty($item['group'])) {
-        foreach ($item['group'] as $delta => $group) {
-          if (empty($group['choice'])) {
+        foreach ($item['group'] as $delta => $choice) {
+          if (empty($choice['choice'])) {
             unset($items[$key]['group'][$delta]);
+          } else {
+            $total_votes += (int) $choice['votes'];
           }
-          $total_votes = $total_votes+$items[$key]['group'][$delta]['votes'];
         }
       }
       $s = serialize($items[$key]['group']);
-      $poll_fetures = serialize($items[$key]['poll_features']);
+      $poll_features = serialize($items[$key]['poll_features']);
       $node->{$field['field_name']}[$key]['choice'] = $s;
       $items[$key]['choice'] = $s;
       $items[$key]['votes'] = $total_votes;
       // adding poll features
-      $items[$key]['poll_features'] = $poll_fetures;
-      $item['nid_poll'] = $node->nid;
+      $items[$key]['poll_features'] = $poll_features;
+      $items[$key]['nid_poll'] = $node->nid;
     }
     break;
   }// switch
