diff --git a/zetta_utils/cloud_management/resource_allocation/k8s/common.py b/zetta_utils/cloud_management/resource_allocation/k8s/common.py
index 62da371d6..a82c92018 100644
--- a/zetta_utils/cloud_management/resource_allocation/k8s/common.py
+++ b/zetta_utils/cloud_management/resource_allocation/k8s/common.py
@@ -67,12 +67,13 @@ def get_mazepa_worker_command(
 ):
     if num_procs == 1 and semaphores_spec is None:
         command = "mazepa.run_worker"
-    else:
-        command = "mazepa.run_worker_manager"
-    if semaphores_spec is None:
+        num_procs_line = ""
         semaphores_line = ""
     else:
+        command = "mazepa.run_worker_manager"
+        num_procs_line = f"num_procs: {num_procs}\n"
         semaphores_line = f"semaphores_spec: {json.dumps(semaphores_spec)}\n"
+
     result = (
         """
     zetta -vv -l try run -s '{
@@ -80,7 +81,7 @@ def get_mazepa_worker_command(
         + f'"@type": "{command}"\n'
         + f"task_queue: {json.dumps(task_queue_spec)}\n"
         + f"outcome_queue: {json.dumps(outcome_queue_spec)}\n"
-        + f"num_procs: {num_procs}\n"
+        + num_procs_line
         + semaphores_line
         + """
         sleep_sec: 5