diff --git a/refEmulate b/refEmulate
index 745b8a6edc18e2a5f5b9a4a5dce841ac3a6d1b5c..ca4e738075c48164fc4884bdee3015a24b3f2229 100755
--- a/refEmulate
+++ b/refEmulate
@@ -85,7 +85,7 @@ files.each do |file_path|
       puts "-- Emulation Output:" 
       puts json['emulator_out']
       puts "---------------------------------------------------------------"
-      puts "The exit code is: #{exit_code}."
+      puts "The exit code is: #{json['emulator_exit']}."
       puts ""
     end
   end