diff --git a/make_page.sh b/make_page.sh
index d2f2217dc2ad03d5426dc07f5217b784c9d0d75b..2836458fdb6f087a1b22d7c261e5eaae9b020dcb 100755
--- a/make_page.sh
+++ b/make_page.sh
@@ -14,7 +14,7 @@ pip install -r requirements.txt
 
 # Create main webpage
 git pull
-rm -r gallery
+[ -d "gallery" ] && rm -rf gallery
 cp -r /home/mcgibbon/public_html/SWIFT/webpage_image_gallery gallery
 python query.py rLY4HeXMXttDOSedTGrYuRufATu2gDwgE84Hqy3B
 python generate_map.py
@@ -23,7 +23,7 @@ rsync -auv compiled/* ../
 
 [ ! -d "swift" ] && git clone "git@gitlab.cosma.dur.ac.uk:swift/swiftsim.git" "swift"
 cd swift
-[ "$(git rev-parse --abbrev-ref HEAD)" != "master" ] && git checkout master
+git checkout master
 git pull
 # Generate read the docs
 cd doc/RTD
@@ -42,7 +42,7 @@ cp swift/doc/onboardingGuide/build/latex/onboarding.pdf ../onboarding.pdf
 # Generate read the docs for the zoom branch
 [ ! -d "swift_will" ] && git clone "git@gitlab.cosma.dur.ac.uk:swift/swiftsim.git" "swift_will"
 cd swift_will
-[ "$(git rev-parse --abbrev-ref HEAD)" != "zoom_docs" ] && git checkout zoom_docs
+git checkout zoom_docs
 git pull
 cd doc/RTD
 [ -d "build" ] && rm -rf build