diff --git a/ros_gz_sim/launch/gz_sim.launch.py.in b/ros_gz_sim/launch/gz_sim.launch.py.in
index ba8244a9..8859d132 100644
--- a/ros_gz_sim/launch/gz_sim.launch.py.in
+++ b/ros_gz_sim/launch/gz_sim.launch.py.in
@@ -121,7 +121,7 @@ def launch_gz(context, *args, **kwargs):
     else:
         debug_prefix = None
 
-    if on_exit_shutdown:
+    if on_exit_shutdown != 'false':
         on_exit = Shutdown()
     else:
         on_exit = None