diff --git a/gui/action.cpp b/gui/action.cpp
index bccf269..06de41e 100755
--- a/gui/action.cpp
+++ b/gui/action.cpp
@@ -1958,48 +1958,10 @@
 	operation_start("Check for TWRP App");
 	if (!simulate)
 	{
-		string sdkverstr = TWFunc::System_Property_Get("ro.build.version.sdk");
-		int sdkver = 0;
-		if (!sdkverstr.empty()) {
-			sdkver = atoi(sdkverstr.c_str());
-		}
-		if (sdkver <= 13) {
-			if (sdkver == 0)
-				LOGINFO("Unable to read sdk version from build prop\n");
-			else
-				LOGINFO("SDK version too low for TWRP app (%i < 14)\n", sdkver);
-			DataManager::SetValue("tw_app_install_status", 1); // 0 = no status, 1 = not installed, 2 = already installed or do not install
-			goto exit;
-		}
-		if (TWFunc::Is_TWRP_App_In_System()) {
-			DataManager::SetValue("tw_app_install_status", 2); // 0 = no status, 1 = not installed, 2 = already installed or do not install
-			goto exit;
-		}
-		if (PartitionManager.Mount_By_Path("/data", false)) {
-			const char parent_path[] = "/data/app";
-			const char app_prefix[] = "me.twrp.twrpapp-";
-			DIR *d = opendir(parent_path);
-			if (d) {
-				struct dirent *p;
-				while ((p = readdir(d))) {
-					if (p->d_type != DT_DIR || strlen(p->d_name) < strlen(app_prefix) || strncmp(p->d_name, app_prefix, strlen(app_prefix)))
-						continue;
-					closedir(d);
-					LOGINFO("App found at '%s/%s'\n", parent_path, p->d_name);
-					DataManager::SetValue("tw_app_install_status", 2); // 0 = no status, 1 = not installed, 2 = already installed or do not install
-					goto exit;
-				}
-				closedir(d);
-			}
-		} else {
-			LOGINFO("Data partition cannot be mounted during app check\n");
-			DataManager::SetValue("tw_app_install_status", 2); // 0 = no status, 1 = not installed, 2 = already installed or do not install
-		}
+		TWFunc::checkforapp();
 	} else
 		simulate_progress_bar();
-	LOGINFO("App not installed\n");
-	DataManager::SetValue("tw_app_install_status", 1); // 0 = no status, 1 = not installed, 2 = already installed
-exit:
+
 	operation_end(0);
 	return 0;
 }
@@ -2112,6 +2074,7 @@
 	} else
 		simulate_progress_bar();
 exit:
+	TWFunc::checkforapp();
 	operation_end(0);
 	return 0;
 }
@@ -2165,6 +2128,7 @@
 	} else
 		simulate_progress_bar();
 exit:
+	TWFunc::checkforapp();
 	operation_end(0);
 	return 0;
 }
diff --git a/gui/theme/common/landscape.xml b/gui/theme/common/landscape.xml
index 9315720..010e08e 100755
--- a/gui/theme/common/landscape.xml
+++ b/gui/theme/common/landscape.xml
@@ -3442,13 +3442,6 @@
 		</page>
 
 		<page name="advanced">
-			<action>
-				<action function="checkforapp"></action>
-				<action function="page">advanced1</action>
-			</action>
-		</page>
-
-		<page name="advanced1">
 			<template name="page"/>
 
 			<text style="text_l">
diff --git a/gui/theme/common/portrait.xml b/gui/theme/common/portrait.xml
index 711139f..b78191d 100755
--- a/gui/theme/common/portrait.xml
+++ b/gui/theme/common/portrait.xml
@@ -3563,13 +3563,6 @@
 		</page>
 
 		<page name="advanced">
-			<action>
-				<action function="checkforapp"></action>
-				<action function="page">advanced1</action>
-			</action>
-		</page>
-
-		<page name="advanced1">
 			<template name="page"/>
 
 			<text style="text_l">
diff --git a/gui/theme/common/watch.xml b/gui/theme/common/watch.xml
index d76a1d3..7debf3a 100755
--- a/gui/theme/common/watch.xml
+++ b/gui/theme/common/watch.xml
@@ -4214,13 +4214,6 @@
 		</page>
 
 		<page name="advanced2">
-			<action>
-				<action function="checkforapp"></action>
-				<action function="page">advanced3</action>
-			</action>
-		</page>
-
-		<page name="advanced3">
 			<template name="page"/>
 
 			<template name="statusbar"/>
diff --git a/twrp-functions.cpp b/twrp-functions.cpp
index 82af082..cefaf91 100755
--- a/twrp-functions.cpp
+++ b/twrp-functions.cpp
@@ -1327,6 +1327,53 @@
 	return false;
 }
 
+void TWFunc::checkforapp(){
+
+	string sdkverstr = System_Property_Get("ro.build.version.sdk");
+	int sdkver = 0;
+	if (!sdkverstr.empty()) {
+		sdkver = atoi(sdkverstr.c_str());
+	}
+	if (sdkver <= 13) {
+		if (sdkver == 0)
+			LOGINFO("Unable to read sdk version from build prop\n");
+		else
+			LOGINFO("SDK version too low for TWRP app (%i < 14)\n", sdkver);
+		DataManager::SetValue("tw_app_install_status", 1); // 0 = no status, 1 = not installed, 2 = already installed or do not install
+		goto exit;
+	}
+	if (Is_TWRP_App_In_System()) {
+		DataManager::SetValue("tw_app_install_status", 2); // 0 = no status, 1 = not installed, 2 = already installed or do not install
+		goto exit;
+	}
+	if (PartitionManager.Mount_By_Path("/data", false)) {
+		const char parent_path[] = "/data/app";
+		const char app_prefix[] = "me.twrp.twrpapp-";
+		DIR *d = opendir(parent_path);
+		if (d) {
+			struct dirent *p;
+			while ((p = readdir(d))) {
+				if (p->d_type != DT_DIR || strlen(p->d_name) < strlen(app_prefix) || strncmp(p->d_name, app_prefix, strlen(app_prefix)))
+					continue;
+				closedir(d);
+				LOGINFO("App found at '%s/%s'\n", parent_path, p->d_name);
+				DataManager::SetValue("tw_app_install_status", 2); // 0 = no status, 1 = not installed, 2 = already installed or do not install
+				goto exit;
+			}
+			closedir(d);
+		}
+	} else {
+		LOGINFO("Data partition cannot be mounted during app check\n");
+		DataManager::SetValue("tw_app_install_status", 2); // 0 = no status, 1 = not installed, 2 = already installed or do not install
+	}
+
+	LOGINFO("App not installed\n");
+	DataManager::SetValue("tw_app_install_status", 1); // 0 = no status, 1 = not installed, 2 = already installed
+exit:
+	return;
+
+}
+
 int TWFunc::Property_Override(string Prop_Name, string Prop_Value) {
 #ifdef TW_INCLUDE_LIBRESETPROP
     return setprop(Prop_Name.c_str(), Prop_Value.c_str(), false);
diff --git a/twrp-functions.hpp b/twrp-functions.hpp
index d185398..3e013c3 100755
--- a/twrp-functions.hpp
+++ b/twrp-functions.hpp
@@ -118,6 +118,7 @@
 	static std::string get_log_dir(); // return recovery log storage directory
 	static void check_selinux_support(); // print whether selinux support is enabled to console
 	static bool Is_TWRP_App_In_System(); // Check if the TWRP app is installed in the system partition
+	static void checkforapp();
 	static int Property_Override(string Prop_Name, string Prop_Value); // Override properties (including ro. properties)
 	static bool Get_Encryption_Policy(ext4_encryption_policy &policy, std::string path); // return encryption policy for path
 	static bool Set_Encryption_Policy(std::string path, const ext4_encryption_policy &policy); // set encryption policy for path
diff --git a/twrp.cpp b/twrp.cpp
index 6df37d9..eb05b2d 100755
--- a/twrp.cpp
+++ b/twrp.cpp
@@ -397,6 +397,8 @@
 	twrpAdbBuFifo *adb_bu_fifo = new twrpAdbBuFifo();
 	adb_bu_fifo->threadAdbBuFifo();
 
+	TWFunc::checkforapp(); //Checking compatibility for TWRP app
+
 	// Launch the main GUI
 	gui_start();
 
