diff --git a/docs/api.md b/docs/api.md
index ba337451..91c81e1f 100644
--- a/docs/api.md
+++ b/docs/api.md
@@ -51,20 +51,24 @@
   - `gzip` a boolean to define whether the traineddata from the remote is gzipped, default: true
   - `logger` a function to log the progress, a quick example is `m => console.log(m)`
   - `errorHandler` a function to handle worker errors, a quick example is `err => console.error(err)`
-
+- `config` an object of customized options which are set prior to initialization
+  - This argument allows for setting "init only" Tesseract parameters
+	  - Most Tesseract parameters can be set after a worker is initialized, using either `worker.setParameters` or the `options` argument of `worker.recognize`.  
+	  - A handful of Tesseract parameters, referred to as "init only" parameters in Tesseract documentation, cannot be modified after Tesseract is initialized--these can only be set using this argument
+		  - Examples include `load_system_dawg`, `load_number_dawg`, and `load_punc_dawg`
 
 **Examples:**
 
 ```javascript
 const { createWorker } = Tesseract;
-const worker = await createWorker({
+const worker = await createWorker('eng', 1, {
   langPath: '...',
   logger: m => console.log(m),
 });
 ```
 
 <a name="worker-recognize"></a>
-### Worker.recognize(image, options, jobId): Promise
+### Worker.recognize(image, options, output, jobId): Promise
 
 Worker.recognize() provides core function of Tesseract.js as it executes OCR
 
@@ -148,6 +152,7 @@ This list is incomplete.  As Tesseract.js passes parameters to the Tesseract eng
 
 - `langs` a string to indicate the languages traineddata to download, multiple languages are concated with **+**, ex: **eng+chi\_tra**
 - `oem` a enum to indicate the OCR Engine Mode you use
+- `config` an object of customized options which are set prior to initialization (see details above)
 - `jobId` Please see details above
 
 Note: to switch from Tesseract LSTM (`oem` value `1`) to Tesseract Legacy (`oem` value `0`) using `worker.reinitialize()`, the worker must already contain the code required to run the Tesseract Legacy model.  Setting `legacyCore: true` and `legacyLang: true` in `createWorker` options ensures this is the case.
diff --git a/docs/local-installation.md b/docs/local-installation.md
index 00e73afa..5ff0fdb0 100644
--- a/docs/local-installation.md
+++ b/docs/local-installation.md
@@ -9,7 +9,7 @@ Because of this we recommend loading `tesseract.js` from a CDN. But if you reall
 In Node.js environment, the only path you may want to customize is languages/langPath.
 
 ```javascript
-const worker = await createWorker({
+const worker = await createWorker('eng', 1, {
   workerPath: 'https://cdn.jsdelivr.net/npm/tesseract.js@v5.0.0/dist/worker.min.js',
   langPath: 'https://tessdata.projectnaptha.com/4.0.0',
   corePath: 'https://cdn.jsdelivr.net/npm/tesseract.js-core@v5.0.0',
diff --git a/docs/workers_vs_schedulers.md b/docs/workers_vs_schedulers.md
index 5452a1a7..64f79e55 100644
--- a/docs/workers_vs_schedulers.md
+++ b/docs/workers_vs_schedulers.md
@@ -4,7 +4,7 @@ Tesseract.js offers 2 ways to run recognition jobs: (1) using a worker directly,
 # Option 1: Using Workers Directly
 The following snippet recognizes text from an image using a single worker.
 
-```
+```javascript
 (async () => {
     const worker = await Tesseract.createWorker('eng');
     const { data: { text } } = await worker.recognize('https://tesseract.projectnaptha.com/img/eng_bw.png');
@@ -22,7 +22,7 @@ In actual use, the `createWorker` step should be separated from the `worker.reco
 # Option 2: Using Schedulers + Workers
 Tesseract.js also supports executing jobs using schedulers.  A scheduler is an object that contains multiple workers, which it uses to execute jobs in parallel.  For example, the following code executes 10 jobs in parallel using 4 workers.
  
-```
+```javascript
 const scheduler = Tesseract.createScheduler();
 
 // Creates worker and adds to scheduler
diff --git a/package-lock.json b/package-lock.json
index 038eae4e..0d998e19 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -1,12 +1,12 @@
 {
   "name": "tesseract.js",
-  "version": "5.0.3",
+  "version": "5.0.4",
   "lockfileVersion": 2,
   "requires": true,
   "packages": {
     "": {
       "name": "tesseract.js",
-      "version": "5.0.3",
+      "version": "5.0.4",
       "hasInstallScript": true,
       "license": "Apache-2.0",
       "dependencies": {
diff --git a/package.json b/package.json
index 4ddf0336..9520579f 100644
--- a/package.json
+++ b/package.json
@@ -1,6 +1,6 @@
 {
   "name": "tesseract.js",
-  "version": "5.0.3",
+  "version": "5.0.4",
   "description": "Pure Javascript Multilingual OCR",
   "main": "src/index.js",
   "types": "src/index.d.ts",
diff --git a/src/worker-script/index.js b/src/worker-script/index.js
index 4fe04c08..8dbe5838 100644
--- a/src/worker-script/index.js
+++ b/src/worker-script/index.js
@@ -249,9 +249,9 @@ const initialize = async ({
     let configStr;
     // config argument may either be config file text, or object with key/value pairs
     // In the latter case we convert to config file text here
-    if (typeof config === 'object') {
+    if (config && typeof config === 'object' && Object.keys(config).length > 0) {
       configStr = JSON.stringify(config).replace(/,/g, '\n').replace(/:/g, ' ').replace(/["'{}]/g, '');
-    } else {
+    } else if (config && typeof config === 'string') {
       configStr = config;
     }
     if (typeof configStr === 'string') {
@@ -260,7 +260,7 @@ const initialize = async ({
     }
 
     api = new TessModule.TessBaseAPI();
-    let status = api.Init(null, langs, oem);
+    let status = api.Init(null, langs, oem, configFile);
     if (status === -1) {
       // Cache is deleted if initialization fails to avoid keeping bad data in cache
       // This assumes that initialization failing only occurs due to bad .traineddata,
@@ -289,7 +289,7 @@ const initialize = async ({
           log('Data from cache missing requested OEM model. Attempting to refresh cache with new language data.');
           // In this case, language data is re-loaded
           await loadLanguage({ workerId, payload: { langs: loadLanguageLangsWorker, options: loadLanguageOptionsWorker } }); // eslint-disable-line max-len
-          status = api.Init(null, langs, oem);
+          status = api.Init(null, langs, oem, configFile);
           if (status === -1) {
             log('Language data refresh failed.');
             const delCachePromise2 = langsArr.map((lang) => adapter.deleteCache(`${loadLanguageOptionsWorker.cachePath || '.'}/${lang}.traineddata`));
