diff --git a/testsuite/expect/test8.10 b/testsuite/expect/test8.10
index 23d3f789260b2a02eb2e890edfb36d5c6bc41687..9e33e97ac564819a5c2d169d41f1809cff6c6559 100755
--- a/testsuite/expect/test8.10
+++ b/testsuite/expect/test8.10
@@ -181,16 +181,16 @@ sleep 1
 
 #Checks job
 if {[check_job $job_id 32 512 1]} {
-	exit exit_code
+	exit $exit_code
 }
 #Checks the job step
 if {[check_step $job_id 0 32 512]} {
-	exit exit_code
+	exit $exit_code
 }
 
 #submit allocation and runs job
 set matches 0
-spawn $salloc -n512 $srun $bin_sleep
+spawn $salloc -n512 $srun $bin_sleep 50
 expect {
 	-re "Granted job allocation ($number)" {
 		set job_id $expect_out(1,string)
@@ -212,11 +212,11 @@ if {$matches !=1} {
 
 #Checks job
 if {[check_job $job_id 32 512 1]} {
-	exit exit_code
+	exit $exit_code
 }
 #Checks the job step
 if {[check_step $job_id 0 32 512]} {
-	exit exit_code
+	exit $exit_code
 }
 
 if {$exit_code == 0} {