diff --git a/entity/BulkMail_entity/entityfields/bindata/onValueChange.js b/entity/BulkMail_entity/entityfields/bindata/onValueChange.js
index 5e84ced62afd83bf5d0b80855cffca4665874031..e2f4b3b355208acd9752355f175122a9f5db9e69 100644
--- a/entity/BulkMail_entity/entityfields/bindata/onValueChange.js
+++ b/entity/BulkMail_entity/entityfields/bindata/onValueChange.js
@@ -1,4 +1,3 @@
-import("system.logging");
 import("DocumentTemplate_lib");
 import("system.neon");
 import("system.vars");
diff --git a/entity/BulkMail_entity/entityfields/content/contentTypeProcess.js b/entity/BulkMail_entity/entityfields/content/contentTypeProcess.js
index af8f592df38c73cf97104d70f983512dd059c129..be637432e44adb2b27d2769ac4964849439e40b9 100644
--- a/entity/BulkMail_entity/entityfields/content/contentTypeProcess.js
+++ b/entity/BulkMail_entity/entityfields/content/contentTypeProcess.js
@@ -5,6 +5,6 @@ import("Document_lib");
 import("system.vars");
 import("DocumentTemplate_lib");
 
-result.string(vars.get("$context.currentTemplateType") == DocumentTemplate.types.TXT// && vars.get("$sys.recordstate") != neon.OPERATINGSTATE_VIEW
+result.string(vars.get("$context.currentTemplateType") == DocumentTemplate.types.TXT && (vars.get("$sys.recordstate") == neon.OPERATINGSTATE_EDIT || vars.get("$sys.recordstate") == neon.OPERATINGSTATE_NEW)
     ? "LONG_TEXT" 
     : "HTML");
\ No newline at end of file
diff --git a/entity/BulkMail_entity/entityfields/content/displayValueProcess.js b/entity/BulkMail_entity/entityfields/content/displayValueProcess.js
index a2ecf36da764cb125c10b42071e1fb4786ae0d54..eb9e6ef7f14579906731e58e54c7a667389e92ab 100644
--- a/entity/BulkMail_entity/entityfields/content/displayValueProcess.js
+++ b/entity/BulkMail_entity/entityfields/content/displayValueProcess.js
@@ -1,4 +1,3 @@
-import("system.logging");
 import("Bulkmail_lib");
 import("system.text");
 import("Employee_lib");
diff --git a/entity/BulkMail_entity/entityfields/content/stateProcess.js b/entity/BulkMail_entity/entityfields/content/stateProcess.js
index fa18329824150cafe345fa394738e1780b3b9822..618982924dea9fdd2077ce7805120d40c41ade75 100644
--- a/entity/BulkMail_entity/entityfields/content/stateProcess.js
+++ b/entity/BulkMail_entity/entityfields/content/stateProcess.js
@@ -8,4 +8,6 @@ if (vars.get("$sys.recordstate") != neon.OPERATINGSTATE_VIEW &&
       || vars.get("$context.currentTemplateType") == DocumentTemplate.types.HTML)) // TODO: invisible for html as there are problems with images which are removed by the html-editor
 {
     result.string(neon.COMPONENTSTATE_INVISIBLE);
-}
\ No newline at end of file
+}
+else
+    result.string(neon.COMPONENTSTATE_EDITABLE);
\ No newline at end of file
diff --git a/entity/DocumentTemplate_entity/recordcontainers/db/onDBInsert.js b/entity/DocumentTemplate_entity/recordcontainers/db/onDBInsert.js
index 880e0943ca60d140e72c416083f2167fc34d2e3f..05dbb4ec89aa2104f2ea127ebc93f2501ef207bc 100644
--- a/entity/DocumentTemplate_entity/recordcontainers/db/onDBInsert.js
+++ b/entity/DocumentTemplate_entity/recordcontainers/db/onDBInsert.js
@@ -1,4 +1,3 @@
-import("system.logging");
 import("DocumentTemplate_lib");
 import("system.vars");
 import("Document_lib");
diff --git a/process/Bulkmail_lib/process.js b/process/Bulkmail_lib/process.js
index 06ef6fc0dcca4ca47b70f94c4f2fb3271cd11aec..c9f13b7ccb8ad8794b256d8f65400d740c7b45df 100644
--- a/process/Bulkmail_lib/process.js
+++ b/process/Bulkmail_lib/process.js
@@ -1,4 +1,3 @@
-import("system.logging");
 import("system.translate");
 import("ActivityTask_lib");
 import("system.util");
diff --git a/process/DocumentTemplate_lib/process.js b/process/DocumentTemplate_lib/process.js
index d6b04b6584727ab50cf9eb3791ba9683d4b4460a..be0a5f1dcab8f68120392ae9a3754b6c50dde718 100644
--- a/process/DocumentTemplate_lib/process.js
+++ b/process/DocumentTemplate_lib/process.js
@@ -1,4 +1,3 @@
-import("system.logging");
 import("Binary_lib");
 import("Communication_lib");
 import("system.neon");
@@ -777,7 +776,6 @@ DocumentTemplateUtils.updateTemplateData = function (pTemplateId, pFileUpload, p
  */
 DocumentTemplateUtils.getTemplateContent = function (pTemplateId, pFileUpload)
 {
-    logging.log(JSON.stringify([pTemplateId, pFileUpload.isFilled()], null, "\t"))
     var type;
     var bindata;
     
@@ -802,8 +800,6 @@ DocumentTemplateUtils.getTemplateContent = function (pTemplateId, pFileUpload)
         }
     }
     
-    logging.log("asd" + JSON.stringify([type], null, "\t"))
-    
     if (type == DocumentTemplate.types.HTML || type == DocumentTemplate.types.TXT || type == DocumentTemplate.types.EML)
     {
         return [util.decodeBase64String(bindata), type];