diff --git a/NEWS b/NEWS
index 35eaedfd9d09ff95b50721674aca7e9ec899e0ea..165c2a4faa6c1fa84a46bd4f81b322fd4581880d 100644
--- a/NEWS
+++ b/NEWS
@@ -9,7 +9,7 @@ documents those changes that are of interest to users and admins.
  -- forward exit_code from step completion to slurmdbd
  -- Add retry logic to socket connect() call from client which can fail 
     when the slurmctld is under heavy load.
- -- Fixed bug when adding associations to add correctly
+ -- Fixed bug when adding associations to add correctly.
  -- Added support for associations for user root.
 
 * Changes in SLURM 1.3.3
diff --git a/src/slurmdbd/proc_req.c b/src/slurmdbd/proc_req.c
index 7915ef5002d388653e6b703c96a8868b1951e0db..1fda0e2d82363b3226b9245a4dff106852e42bea 100644
--- a/src/slurmdbd/proc_req.c
+++ b/src/slurmdbd/proc_req.c
@@ -1678,13 +1678,13 @@ static int  _step_complete(void *db_conn,
 	job.assoc_id = step_comp_msg->assoc_id;
 	job.db_index = step_comp_msg->db_index;
 	job.end_time = step_comp_msg->end_time;
+	step.exit_code = step_comp_msg->exit_code;
 	step.jobacct = step_comp_msg->jobacct;
 	job.job_id = step_comp_msg->job_id;
 	job.requid = step_comp_msg->req_uid;
 	job.start_time = step_comp_msg->start_time;
 	details.submit_time = step_comp_msg->job_submit_time;
 	step.step_id = step_comp_msg->step_id;
-	step.exit_code = step_comp_msg->exit_code;
 	job.total_procs = step_comp_msg->total_procs;
 
 	job.details = &details;