diff --git a/smart_launch.sh b/smart_launch.sh
index 2e140b9..762064b 100755
--- a/smart_launch.sh
+++ b/smart_launch.sh
@@ -8,7 +8,7 @@ then
   echo "###"
   echo "# Finding latest map"
   echo "###"
-  $last_save=ls /opt/factorio/saves -lt | grep save |head -1 |awk '{print $(NF)}'
+  last_save=$(ls /opt/factorio/saves -lt | grep save |head -1 |awk '{print $(NF)}')
 else
   echo "###"
   echo "# Creating a new map [save.zip]"