diff --git a/modules/taxonomy/taxonomy.module b/modules/taxonomy/taxonomy.module
index eb81870..36ba0aa 100644
--- a/modules/taxonomy/taxonomy.module
+++ b/modules/taxonomy/taxonomy.module
@@ -1495,7 +1495,7 @@ function taxonomy_field_formatter_prepare_view($entity_type, $entities, $field,
           $items[$id][$delta]['taxonomy_term'] = $terms[$item['tid']];
         }
         // Terms to be created are not in $terms, but are still legitimate.
-        else if ($item['tid'] == 'autocreate') {
+        elseif ($item['tid'] == 'autocreate') {
           // Leave the item in place.
         }
         // Otherwise, unset the instance value, since the term does not exist.
@@ -1531,10 +1531,21 @@ function taxonomy_term_title($term) {
  */
 function taxonomy_field_widget_form(&$form, &$form_state, $field, $instance, $langcode, $items, $delta, $element) {
   $tags = array();
+  //Assigning default values for the term fields
   foreach ($items as $item) {
-    $tags[$item['tid']] = isset($item['taxonomy_term']) ? $item['taxonomy_term'] : taxonomy_term_load($item['tid']);
+    if ($item['tid'] == 'autocreate') {
+      $tags[$item['tid']] = (object) $item;
+    } 
+    else {
+      if (isset($item['taxonomy_term'])) {
+        $tags[$item['tid']] = $item['taxonomy_term'];
+      }
+      else {
+        $tags[$item['tid']] = taxonomy_term_load($item['tid']);
+      }
+    }
   }
-
+  
   $element += array(
     '#type' => 'textfield',
     '#default_value' => taxonomy_implode_tags($tags),
@@ -1543,7 +1554,7 @@ function taxonomy_field_widget_form(&$form, &$form_state, $field, $instance, $la
     '#maxlength' => 1024,
     '#element_validate' => array('taxonomy_autocomplete_validate'),
   );
-
+  
   return $element;
 }
 
@@ -1578,7 +1589,7 @@ function taxonomy_autocomplete_validate($element, &$form_state) {
           'tid' => 'autocreate',
           'vid' => $vocabulary->vid,
           'name' => $typed_term,
-          'vocabulary_machine_name' => $vocabulary->machine_name,
+          'vocabulary_machine_name' => $vocabulary->machine_name
         );
       }
       $value[] = (array)$term;
@@ -1691,11 +1702,9 @@ function taxonomy_rdf_mapping() {
  */
 
 /**
- * Implements hook_field_presave().
- *
- * Create any new terms defined in a freetagging vocabulary.
- */
-function taxonomy_field_presave($entity_type, $entity, $field, $instance, $langcode, &$items) {
+  * Create any new terms defined in a freetagging vocabulary.
+  */
+function taxonomy_save_new_terms(&$items) {
   foreach ($items as $delta => $item) {
     if ($item['tid'] == 'autocreate') {
       $term = (object) $item;
@@ -1706,10 +1715,32 @@ function taxonomy_field_presave($entity_type, $entity, $field, $instance, $langc
   }
 }
 
+
+/**
+ * Implements hook_field_presave().
+ */
+function taxonomy_field_presave($entity_type, $entity, $field, $instance, $langcode, &$items) {
+  taxonomy_save_new_terms($items);
+}
+
 /**
  * Implements hook_field_insert().
  */
 function taxonomy_field_insert($entity_type, $entity, $field, $instance, $langcode, &$items) {
+  // default values have not tid value setted
+  foreach ($items as $key => $item) {
+    // items inserted by default does not have a tid
+    if ($item['tid'] == 'autocreate') {
+      $existing = taxonomy_get_term_by_name($item['name']);
+      if (isset($existing[1])) {
+        $items[$key]['tid'] = $existing[1]->tid;
+      } 
+    }
+  }
+
+  // Save any new terms that were not matched.
+  taxonomy_save_new_terms($items);
+
   // We maintain a denormalized table of term/node relationships, containing
   // only data for current, published nodes.
   if (variable_get('taxonomy_maintain_index_table', TRUE) && $field['storage']['type'] == 'field_sql_storage' && $entity_type == 'node' && $entity->status) {
@@ -1778,4 +1809,4 @@ function taxonomy_taxonomy_term_delete($term) {
 
 /**
  * @} End of "defgroup taxonomy_index"
- */
+ */
\ No newline at end of file
