diff --git a/includes/entity.controller.inc b/home/asaleo/Desktop/entity/includes/entity.controller.inc
index b51d2cb..b3500b0 100644
--- a/includes/entity.controller.inc
+++ b/includes/entity.controller.inc
@@ -456,15 +456,6 @@ class EntityAPIController extends DrupalDefaultEntityController implements Entit
 
       $this->invoke('presave', $entity);
 
-     // if entity is enable field.
-     // we need save revision for field of entity. 
-     if ($this->entityInfo['fieldable']) {
-      	// if entity is created (is_new) call field_atttach_insert otherwrite we need save revision for entity.
-	    $op = (isset($this->is_new) && $this->is_new == TRUE) ? 'insert' : 'update';
-	    $function = 'field_attach_' . $op;
-	    $function ($this->entityType, $entity);
-      }
-      
       if (!empty($entity->{$this->idKey}) && empty($entity->is_new)) {
         $return = drupal_write_record($this->entityInfo['base table'], $entity, $this->idKey);
         $this->resetCache(array($entity->{$this->nameKey}));
diff --git a/includes/entity.controller.inc b/includes/entity.controller.inc
index b3500b0..b51d2cb 100644
--- a/includes/entity.controller.inc
+++ b/includes/entity.controller.inc
@@ -456,6 +456,15 @@ class EntityAPIController extends DrupalDefaultEntityController implements Entit
 
       $this->invoke('presave', $entity);
 
+     // if entity is enable field.
+     // we need save revision for field of entity. 
+     if ($this->entityInfo['fieldable']) {
+      	// if entity is created (is_new) call field_atttach_insert otherwrite we need save revision for entity.
+	    $op = (isset($this->is_new) && $this->is_new == TRUE) ? 'insert' : 'update';
+	    $function = 'field_attach_' . $op;
+	    $function ($this->entityType, $entity);
+      }
+      
       if (!empty($entity->{$this->idKey}) && empty($entity->is_new)) {
         $return = drupal_write_record($this->entityInfo['base table'], $entity, $this->idKey);
         $this->resetCache(array($entity->{$this->nameKey}));
