diff --git a/compile.bat b/compile.bat
index ec8bda25248803f824719dd59c073a36896d52d6..1009033f4f4daef9b53598014a7703d8659232be 100644
--- a/compile.bat
+++ b/compile.bat
@@ -3,6 +3,7 @@
 
 :: Set working directory
 pushd %~dp0
+SETLOCAL
 
 :: See if we can find a git installation
 set GITFOUND=no
@@ -29,6 +30,7 @@ if %GITFOUND% == yes (
 if not exist "bin\resources" mkdir bin\resources
 CALL devTools/concatFiles.bat js\ "*.js" bin\fc.js
 CALL devTools/concatFiles.bat css\ "*.css" bin\fc.css
+SET TWEEGO_PATH=%~dp0devTools\tweeGo\storyFormats
 :: Run the appropriate compiler for the user's CPU architecture.
 if %PROCESSOR_ARCHITECTURE% == AMD64 (
 	CALL "%~dp0devTools\tweeGo\tweego_win64.exe" -o "%~dp0bin/FC_pregmod.html" --module=bin/fc.js --module=bin/fc.css --head resources/raster/favicon/arcologyVector.html "%~dp0src"
@@ -39,5 +41,6 @@ DEL bin\fc.js
 DEL bin\fc.css
 IF EXIST "%~dp0src\002-config\fc-version.js.commitHash.js" DEL "%~dp0src\002-config\fc-version.js.commitHash.js"
 
+ENDLOCAL
 popd
 ECHO Done