diff --git a/Makefile b/Makefile
index 21070a560433d6d37f13e2003cc018acb50307ee..593b427217631a7b59cbeb024a1bedbeedf3602b 100644
--- a/Makefile
+++ b/Makefile
@@ -97,6 +97,8 @@ define archdir =
 $(WORKSPACE)/$(call to_arch,$1)
 endef
 
+IMAGE_DIR=$(WORKSPACE)/image_files
+
 ARCH_DIR=$(call archdir,$(ARCH))
 PRIMARY_ARCH_DIR=$(call archdir,$(PRIMARY_ARCH))
 SECONDARY_ARCH_DIR=$(call archdir,$(SECONDARY_ARCH))
@@ -511,12 +513,12 @@ $(IMAGE_DIR)$(GRUB_INSTALL_DIR)/lipinfo.cfg : | $(WORKSPACE)
 
 image_mount_if : $(IMAGE_PART_FILE)
 	mkdir -p "$(IMAGE_DIR)"
-	[ "$$(findmnt --target "$(IMAGE_DIR)" -f -n --output=target)" = "$(IMAGE_DIR)" ] \
+	[ "$$(findmnt --target "$(IMAGE_DIR)" -f -n --output=target)" = "$(shell readlink -f "$(IMAGE_DIR)")" ] \
 		|| mount "$(IMAGE_PART_FILE)" "$(IMAGE_DIR)"
 
 image_umount_if :
 	#if something is mounted then umount
-	[ "$$(findmnt --target "$(IMAGE_DIR)" -f -n --output=target)" != "$(IMAGE_DIR)" ] \
+	[ "$$(findmnt --target "$(IMAGE_DIR)" -f -n --output=target)" != "$(shell readlink -f "$(IMAGE_DIR)")" ] \
 		|| umount -d "$(IMAGE_DIR)"
 
 $(call ensure_mount,image) : image_content $(GRUB_ASSEMBLE_DIR)/mbr.img
diff --git a/config/Makefile.conf.defaults b/config/Makefile.conf.defaults
index 128f3869174a84785dd00785ac68f3a25710fbf5..6fb4e34424c5da9c0d613a9f102e69e532b27474 100644
--- a/config/Makefile.conf.defaults
+++ b/config/Makefile.conf.defaults
@@ -29,7 +29,6 @@ ISO_PATTERN_FLAGS=
 
 APT_SOURCE_URL_OVERRIDE=http://ftp.halifax.rwth-aachen.de/ubuntu/
 
-IMAGE_DIR=$(WORKSPACE)/image_files
 IMAGE_GIT_URL=https://www.fsmpi.rwth-aachen.de/git/lipstick
 IMAGE_GIT_BRANCH=ss15
 IMAGE_EXTRA_INFO=