diff --git a/modules/com_vtiger_workflow/tasks/VTCreateEntityTask.inc b/modules/com_vtiger_workflow/tasks/VTCreateEntityTask.inc
index a096a87e4363ee9d326a8c2d10b5c00b3369257c..1e2c7f6574c9b72f1f2ac0bd0e0df3effccd7ae4 100644
--- a/modules/com_vtiger_workflow/tasks/VTCreateEntityTask.inc
+++ b/modules/com_vtiger_workflow/tasks/VTCreateEntityTask.inc
@@ -32,6 +32,7 @@ class VTCreateEntityTask extends VTTask {
 
 		$entityType = $this->entity_type;		
 		if(!vtlib_isModuleActive($entityType)) {
+			$util->revertUser();
 			return;
 		}
 
@@ -198,6 +199,7 @@ class VTCreateEntityTask extends VTTask {
 			} catch (Exception $e) {
 			}
 			$util->revertUser();
+			return;
 		}
 
 		$util->revertUser();
@@ -225,4 +227,4 @@ class VTCreateEntityTask extends VTTask {
 	}
 
 }
-?>
\ No newline at end of file
+?>
diff --git a/modules/com_vtiger_workflow/tasks/VTUpdateFieldsTask.inc b/modules/com_vtiger_workflow/tasks/VTUpdateFieldsTask.inc
index 826894a5a35282639be0eb0b05cbe6b97fbd4976..35b74839387c6177050cc6b3c0da57d7fdb9f85b 100644
--- a/modules/com_vtiger_workflow/tasks/VTUpdateFieldsTask.inc
+++ b/modules/com_vtiger_workflow/tasks/VTUpdateFieldsTask.inc
@@ -345,7 +345,6 @@ class VTUpdateFieldsTask extends VTTask {
 
 			// Reverting back the action name as there can be some dependencies on this.
 			$_REQUEST['action'] = $actionName;
-			$util->revertUser();
 		}
 		$util->revertUser();
 		$_FILES = $tmpFiles;
@@ -419,4 +418,4 @@ class VTUpdateFieldsTask extends VTTask {
 
 }
 
-?>
\ No newline at end of file
+?>