diff --git a/src/common/slurm_protocol_api.c b/src/common/slurm_protocol_api.c
index 1f67a9ba0130cf684be51b8004f52dced755a9b3..eea92637122b9e206d9a9bd066639592c8d93488 100644
--- a/src/common/slurm_protocol_api.c
+++ b/src/common/slurm_protocol_api.c
@@ -930,9 +930,8 @@ List slurm_receive_msgs(slurm_fd fd, int steps, int timeout)
 		orig_timeout = timeout;
 	}
 	if(steps) {
-		orig_timeout = timeout/steps;
+		orig_timeout = (timeout - (5000*(steps-1)))/steps;
 		steps--;
-		orig_timeout -= (5000*steps);
 	} 
 
 	debug4("orig_timeout was %d we have %d steps and a timeout of %d",