diff --git a/twrp.cpp b/twrp.cpp
index a6b0faa..4a6a8b8 100755
--- a/twrp.cpp
+++ b/twrp.cpp
@@ -179,33 +179,6 @@
 				property_set("ro.twrp.sar", fallback_sar ? "1" : "0");
 			}
 
-// We are doing this here during SAR-detection, since we are mounting the system-partition anyway
-// This way we don't need to remount it later, just for overriding properties
-#if defined(TW_INCLUDE_LIBRESETPROP) && defined(TW_OVERRIDE_SYSTEM_PROPS)
-			stringstream override_props(EXPAND(TW_OVERRIDE_SYSTEM_PROPS));
-			string current_prop;
-			while (getline(override_props, current_prop, ';')) {
-				string other_prop;
-				if (current_prop.find("=") != string::npos) {
-					other_prop = current_prop.substr(current_prop.find("=") + 1);
-					current_prop = current_prop.substr(0, current_prop.find("="));
-				} else {
-					other_prop = current_prop;
-				}
-				other_prop = android::base::Trim(other_prop);
-				current_prop = android::base::Trim(current_prop);
-				string sys_val = TWFunc::System_Property_Get(other_prop, SarPartitionManager, "/s");
-				if (!sys_val.empty()) {
-					LOGINFO("Overriding %s with value: \"%s\" from system property %s\n", current_prop.c_str(), sys_val.c_str(), other_prop.c_str());
-					int error = TWFunc::Property_Override(current_prop, sys_val);
-					if (error) {
-						LOGERR("Failed overriding property %s, error_code: %d\n", current_prop.c_str(), error);
-					}
-				} else {
-					LOGINFO("Not overriding %s with empty value from system property %s\n", current_prop.c_str(), other_prop.c_str());
-				}
-			}
-#endif
 			SarPartitionManager.UnMount_By_Path("/s", false);
 		} else {
 			LOGINFO("SAR-DETECT: Could not mount system partition, falling back to %s\n", fallback_sar ? "SAR":"Non-SAR");
@@ -444,6 +417,37 @@
 		}
 	}
 #endif
+// We are doing this here to allow super partition to be set up prior to overriding properties
+#if defined(TW_INCLUDE_LIBRESETPROP) && defined(TW_OVERRIDE_SYSTEM_PROPS)
+	if (!PartitionManager.Mount_By_Path(PartitionManager.Get_Android_Root_Path(), true)) {
+		LOGERR("Unable to mount %s\n", PartitionManager.Get_Android_Root_Path().c_str());
+	} else {
+		stringstream override_props(EXPAND(TW_OVERRIDE_SYSTEM_PROPS));
+		string current_prop;
+		while (getline(override_props, current_prop, ';')) {
+			string other_prop;
+			if (current_prop.find("=") != string::npos) {
+				other_prop = current_prop.substr(current_prop.find("=") + 1);
+				current_prop = current_prop.substr(0, current_prop.find("="));
+			} else {
+				other_prop = current_prop;
+			}
+			other_prop = android::base::Trim(other_prop);
+			current_prop = android::base::Trim(current_prop);
+			string sys_val = TWFunc::System_Property_Get(other_prop, PartitionManager, PartitionManager.Get_Android_Root_Path().c_str());
+			if (!sys_val.empty()) {
+				LOGINFO("Overriding %s with value: \"%s\" from system property %s\n", current_prop.c_str(), sys_val.c_str(), other_prop.c_str());
+				int error = TWFunc::Property_Override(current_prop, sys_val);
+				if (error) {
+					LOGERR("Failed overriding property %s, error_code: %d\n", current_prop.c_str(), error);
+				}
+			} else {
+				LOGINFO("Not overriding %s with empty value from system property %s\n", current_prop.c_str(), other_prop.c_str());
+			}
+		}
+		PartitionManager.UnMount_By_Path(PartitionManager.Get_Android_Root_Path(), false);
+	}
+#endif
 
 	twrpAdbBuFifo *adb_bu_fifo = new twrpAdbBuFifo();
 	adb_bu_fifo->threadAdbBuFifo();
