diff --git a/entity/SerialLetter_entity/recordcontainers/db/onDBInsert.js b/entity/SerialLetter_entity/recordcontainers/db/onDBInsert.js
index 8b5fdc99a8701aa1d4fa95b9fcab9be4359dbd01..b22db286189a867374922dafbfe8893cee329ed0 100644
--- a/entity/SerialLetter_entity/recordcontainers/db/onDBInsert.js
+++ b/entity/SerialLetter_entity/recordcontainers/db/onDBInsert.js
@@ -14,5 +14,5 @@ var template = DocumentTemplate.fromUpload(bindata);
 
 if (template.content)
 {
-    SingleBinaryUtils.insert("SERIALLETTER", "DOCUMENT", letterId, template.content, template.filename, "");
+    SingleBinaryUtils.insert("SERIALLETTER", "SERIALLETTERFILE", letterId, template.content, template.filename, "");
 }
\ No newline at end of file
diff --git a/process/Bulkmail_lib/process.js b/process/Bulkmail_lib/process.js
index ed01a6c323b20ac02645adb1d757d883a96db58e..06a1f162e5899a3e69f723216a23d423f3bc20a0 100644
--- a/process/Bulkmail_lib/process.js
+++ b/process/Bulkmail_lib/process.js
@@ -433,7 +433,7 @@ SerialLetterUtils.buildSerialLetter = function (pSerialLetterId, pRecipientIds)
     var contactIds = contactIdsSelect.table();
     
     return {
-        content : template.getSerialLetterByContactIds(contactIds),
+        content : template.content,
         filename : template.filename,
         title : title
     };
diff --git a/process/DocumentTemplate_lib/process.js b/process/DocumentTemplate_lib/process.js
index 7630a1c2fea10e5f8a2dc64b6de2fcddda44fd91..2a4e145210af72e766d78d58a25f54699c4bae8f 100644
--- a/process/DocumentTemplate_lib/process.js
+++ b/process/DocumentTemplate_lib/process.js
@@ -269,7 +269,8 @@ DocumentTemplate.loadTemplate = function (pAssignmentRowId, pAssignmentTable, pR
     var mimeType = templateDocument[0][db.BINARY_MIMETYPE];
     var type = DocumentTemplate.types.fromBinaryMetadata(templateDocument[0]);
     
-    if (pResolveSubtemplates == undefined) pResolveSubtemplates = true;
+    if (pResolveSubtemplates == undefined)
+        pResolveSubtemplates = true;
     
     return new DocumentTemplate(db.getBinaryContent(binaryId, alias), type, filename, pResolveSubtemplates, templateId, mimeType);
 }