diff --git a/gui/action.cpp b/gui/action.cpp
index 36f4006..32adb84 100644
--- a/gui/action.cpp
+++ b/gui/action.cpp
@@ -227,13 +227,12 @@
 
 		// Now, check if we need to ensure TWRP remains installed...
 		struct stat st;
-		string result;
 		if (stat("/sbin/installTwrp", &st) == 0)
 		{
 			DataManager::SetValue("tw_operation", "Configuring TWRP");
 			DataManager::SetValue("tw_partition", "");
 			gui_print("Configuring TWRP...\n");
-			if (TWFunc::Exec_Cmd("/sbin/installTwrp reinstall", result) < 0)
+			if (TWFunc::Exec_Cmd("/sbin/installTwrp reinstall") < 0)
 			{
 				gui_print("Unable to configure TWRP with this kernel.\n");
 			}
@@ -759,7 +758,7 @@
 
 			if (wipe_cache)
 				PartitionManager.Wipe_By_Path("/cache");
-			string result;
+
 			if (DataManager::GetIntValue(TW_HAS_INJECTTWRP) == 1 && DataManager::GetIntValue(TW_INJECT_AFTER_ZIP) == 1) {
 				operation_start("ReinjectTWRP");
 				gui_print("Injecting TWRP into boot image...\n");
@@ -768,10 +767,10 @@
 				} else {
 					TWPartition* Boot = PartitionManager.Find_Partition_By_Path("/boot");
 					if (Boot == NULL || Boot->Current_File_System != "emmc")
-						TWFunc::Exec_Cmd("injecttwrp --dump /tmp/backup_recovery_ramdisk.img /tmp/injected_boot.img --flash", result);
+						TWFunc::Exec_Cmd("injecttwrp --dump /tmp/backup_recovery_ramdisk.img /tmp/injected_boot.img --flash");
 					else {
 						string injectcmd = "injecttwrp --dump /tmp/backup_recovery_ramdisk.img /tmp/injected_boot.img --flash bd=" + Boot->Actual_Block_Device;
-						TWFunc::Exec_Cmd(injectcmd, result);
+						TWFunc::Exec_Cmd(injectcmd);
 					}
 					gui_print("TWRP injection complete.\n");
 				}
@@ -961,9 +960,8 @@
 			if (simulate) {
 				simulate_progress_bar();
 			} else {
-				string result;
 				string cmd = "dd " + arg;
-				TWFunc::Exec_Cmd(cmd, result);
+				TWFunc::Exec_Cmd(cmd);
 			}
 			operation_end(0, simulate);
 			return 0;
@@ -1024,14 +1022,13 @@
 		if (function == "cmd")
 		{
 			int op_status = 0;
-			string result;
 
 			operation_start("Command");
 			LOGINFO("Running command: '%s'\n", arg.c_str());
 			if (simulate) {
 				simulate_progress_bar();
 			} else {
-				op_status = TWFunc::Exec_Cmd(arg, result);
+				op_status = TWFunc::Exec_Cmd(arg);
 				if (op_status != 0)
 					op_status = 1;
 			}
@@ -1082,13 +1079,12 @@
 		if (function == "reinjecttwrp")
 		{
 			int op_status = 0;
-			string result;
 			operation_start("ReinjectTWRP");
 			gui_print("Injecting TWRP into boot image...\n");
 			if (simulate) {
 				simulate_progress_bar();
 			} else {
-				TWFunc::Exec_Cmd("injecttwrp --dump /tmp/backup_recovery_ramdisk.img /tmp/injected_boot.img --flash", result);
+				TWFunc::Exec_Cmd("injecttwrp --dump /tmp/backup_recovery_ramdisk.img /tmp/injected_boot.img --flash");
 				gui_print("TWRP injection complete.\n");
 			}
 
@@ -1175,7 +1171,7 @@
 			} else {
 				int wipe_cache = 0;
 				int wipe_dalvik = 0;
-				string result, Sideload_File;
+				string Sideload_File;
 
 				if (!PartitionManager.Mount_Current_Storage(true)) {
 					operation_end(1, simulate);
@@ -1207,10 +1203,10 @@
 					} else {
 						TWPartition* Boot = PartitionManager.Find_Partition_By_Path("/boot");
 						if (Boot == NULL || Boot->Current_File_System != "emmc")
-							TWFunc::Exec_Cmd("injecttwrp --dump /tmp/backup_recovery_ramdisk.img /tmp/injected_boot.img --flash", result);
+							TWFunc::Exec_Cmd("injecttwrp --dump /tmp/backup_recovery_ramdisk.img /tmp/injected_boot.img --flash");
 						else {
 							string injectcmd = "injecttwrp --dump /tmp/backup_recovery_ramdisk.img /tmp/injected_boot.img --flash bd=" + Boot->Actual_Block_Device;
-							TWFunc::Exec_Cmd(injectcmd, result);
+							TWFunc::Exec_Cmd(injectcmd);
 						}
 						gui_print("TWRP injection complete.\n");
 					}
diff --git a/openrecoveryscript.cpp b/openrecoveryscript.cpp
index 88b3829..fee6fe9 100644
--- a/openrecoveryscript.cpp
+++ b/openrecoveryscript.cpp
@@ -314,8 +314,7 @@
 			} else if (strcmp(command, "cmd") == 0) {
 				DataManager::SetValue("tw_action_text2", "Running Command");
 				if (cindex != 0) {
-					string status;
-					TWFunc::Exec_Cmd(value, status);
+					TWFunc::Exec_Cmd(value);
 				} else {
 					LOGERR("No value given for cmd\n");
 				}
@@ -364,14 +363,13 @@
 		return 1;
 	}
 	if (install_cmd && DataManager::GetIntValue(TW_HAS_INJECTTWRP) == 1 && DataManager::GetIntValue(TW_INJECT_AFTER_ZIP) == 1) {
-		string status;
 		gui_print("Injecting TWRP into boot image...\n");
 		TWPartition* Boot = PartitionManager.Find_Partition_By_Path("/boot");
 		if (Boot == NULL || Boot->Current_File_System != "emmc")
-			TWFunc::Exec_Cmd("injecttwrp --dump /tmp/backup_recovery_ramdisk.img /tmp/injected_boot.img --flash", status);
+			TWFunc::Exec_Cmd("injecttwrp --dump /tmp/backup_recovery_ramdisk.img /tmp/injected_boot.img --flash");
 		else {
 			string injectcmd = "injecttwrp --dump /tmp/backup_recovery_ramdisk.img /tmp/injected_boot.img --flash bd=" + Boot->Actual_Block_Device;
-			TWFunc::Exec_Cmd(injectcmd.c_str(), status);
+			TWFunc::Exec_Cmd(injectcmd.c_str());
 		}
 		gui_print("TWRP injection complete.\n");
 	}
diff --git a/partition.cpp b/partition.cpp
index 11a4d9e..c1c99f6 100644
--- a/partition.cpp
+++ b/partition.cpp
@@ -684,14 +684,13 @@
 	char command[255], line[512];
 	int include_block = 1;
 	unsigned int min_len;
-	string result;
 
 	if (!Mount(Display_Error))
 		return false;
 
 	min_len = Actual_Block_Device.size() + 2;
 	sprintf(command, "df %s > /tmp/dfoutput.txt", Mount_Point.c_str());
-	TWFunc::Exec_Cmd(command, result);
+	TWFunc::Exec_Cmd(command);
 	fp = fopen("/tmp/dfoutput.txt", "rt");
 	if (fp == NULL) {
 		LOGINFO("Unable to open /tmp/dfoutput.txt.\n");
@@ -921,9 +920,8 @@
 		Update_Size(Display_Error);
 
 	if (!Symlink_Mount_Point.empty()) {
-		string Command, Result;
-		Command = "mount '" + Symlink_Path + "' '" + Symlink_Mount_Point + "'";
-		TWFunc::Exec_Cmd(Command, Result);
+		string Command = "mount '" + Symlink_Path + "' '" + Symlink_Mount_Point + "'";
+		TWFunc::Exec_Cmd(Command);
 	}
 	return true;
 }
@@ -1243,13 +1241,13 @@
 		return false;
 
 	if (TWFunc::Path_Exists("/sbin/mke2fs")) {
-		string command, result;
+		string command;
 
 		gui_print("Formatting %s using mke2fs...\n", Display_Name.c_str());
 		Find_Actual_Block_Device();
 		command = "mke2fs -t " + File_System + " -m 0 " + Actual_Block_Device;
 		LOGINFO("mke2fs command: %s\n", command.c_str());
-		if (TWFunc::Exec_Cmd(command, result) == 0) {
+		if (TWFunc::Exec_Cmd(command) == 0) {
 			Current_File_System = File_System;
 			Recreate_AndSec_Folder();
 			gui_print("Done.\n");
@@ -1278,7 +1276,7 @@
 	}
 #else
 	if (TWFunc::Path_Exists("/sbin/make_ext4fs")) {
-		string Command, result;
+		string Command;
 
 		gui_print("Formatting %s using make_ext4fs...\n", Display_Name.c_str());
 		Find_Actual_Block_Device();
@@ -1295,7 +1293,7 @@
 		}
 		Command += " -a " + Mount_Point + " " + Actual_Block_Device;
 		LOGINFO("make_ext4fs command: %s\n", Command.c_str());
-		if (TWFunc::Exec_Cmd(Command, result) == 0) {
+		if (TWFunc::Exec_Cmd(Command) == 0) {
 			Current_File_System = "ext4";
 			Recreate_AndSec_Folder();
 			gui_print("Done.\n");
@@ -1311,7 +1309,7 @@
 }
 
 bool TWPartition::Wipe_FAT() {
-	string command, result;
+	string command;
 
 	if (TWFunc::Path_Exists("/sbin/mkdosfs")) {
 		if (!UnMount(true))
@@ -1320,7 +1318,7 @@
 		gui_print("Formatting %s using mkdosfs...\n", Display_Name.c_str());
 		Find_Actual_Block_Device();
 		command = "mkdosfs " + Actual_Block_Device;
-		if (TWFunc::Exec_Cmd(command, result) == 0) {
+		if (TWFunc::Exec_Cmd(command) == 0) {
 			Current_File_System = "vfat";
 			Recreate_AndSec_Folder();
 			gui_print("Done.\n");
@@ -1338,7 +1336,7 @@
 }
 
 bool TWPartition::Wipe_EXFAT() {
-	string command, result;
+	string command;
 
 	if (TWFunc::Path_Exists("/sbin/mkexfatfs")) {
 		if (!UnMount(true))
@@ -1347,7 +1345,7 @@
 		gui_print("Formatting %s using mkexfatfs...\n", Display_Name.c_str());
 		Find_Actual_Block_Device();
 		command = "mkexfatfs " + Actual_Block_Device;
-		if (TWFunc::Exec_Cmd(command, result) == 0) {
+		if (TWFunc::Exec_Cmd(command) == 0) {
 			Recreate_AndSec_Folder();
 			gui_print("Done.\n");
 			return true;
@@ -1404,7 +1402,7 @@
 }
 
 bool TWPartition::Wipe_F2FS() {
-	string command, result;
+	string command;
 
 	if (TWFunc::Path_Exists("/sbin/mkfs.f2fs")) {
 		if (!UnMount(true))
@@ -1413,7 +1411,7 @@
 		gui_print("Formatting %s using mkfs.f2fs...\n", Display_Name.c_str());
 		Find_Actual_Block_Device();
 		command = "mkfs.f2fs " + Actual_Block_Device;
-		if (TWFunc::Exec_Cmd(command, result) == 0) {
+		if (TWFunc::Exec_Cmd(command) == 0) {
 			Recreate_AndSec_Folder();
 			gui_print("Done.\n");
 			return true;
@@ -1534,7 +1532,7 @@
 
 bool TWPartition::Backup_DD(string backup_folder) {
 	char back_name[255], backup_size[32];
-	string Full_FileName, Command, result, DD_BS;
+	string Full_FileName, Command, DD_BS;
 	int use_compression;
 
 	sprintf(backup_size, "%llu", Backup_Size);
@@ -1550,7 +1548,7 @@
 
 	Command = "dd if=" + Actual_Block_Device + " of='" + Full_FileName + "'" + " bs=" + DD_BS + "c count=1";
 	LOGINFO("Backup command: '%s'\n", Command.c_str());
-	TWFunc::Exec_Cmd(Command, result);
+	TWFunc::Exec_Cmd(Command);
 	if (TWFunc::Get_File_Size(Full_FileName) == 0) {
 		LOGERR("Backup file size for '%s' is 0 bytes.\n", Full_FileName.c_str());
 		return false;
@@ -1560,7 +1558,7 @@
 
 bool TWPartition::Backup_Dump_Image(string backup_folder) {
 	char back_name[255];
-	string Full_FileName, Command, result;
+	string Full_FileName, Command;
 	int use_compression;
 
 	TWFunc::GUI_Operation_Text(TW_BACKUP_TEXT, Display_Name, "Backing Up");
@@ -1573,7 +1571,7 @@
 
 	Command = "dump_image " + MTD_Name + " '" + Full_FileName + "'";
 	LOGINFO("Backup command: '%s'\n", Command.c_str());
-	TWFunc::Exec_Cmd(Command, result);
+	TWFunc::Exec_Cmd(Command);
 	if (TWFunc::Get_File_Size(Full_FileName) == 0) {
 		// Actual size may not match backup size due to bad blocks on MTD devices so just check for 0 bytes
 		LOGERR("Backup file size for '%s' is 0 bytes.\n", Full_FileName.c_str());
@@ -1637,7 +1635,7 @@
 }
 
 bool TWPartition::Restore_DD(string restore_folder) {
-	string Full_FileName, Command, result;
+	string Full_FileName, Command;
 
 	TWFunc::GUI_Operation_Text(TW_RESTORE_TEXT, Display_Name, "Restoring");
 	Full_FileName = restore_folder + "/" + Backup_FileName;
@@ -1657,22 +1655,22 @@
 	gui_print("Restoring %s...\n", Display_Name.c_str());
 	Command = "dd bs=4096 if='" + Full_FileName + "' of=" + Actual_Block_Device;
 	LOGINFO("Restore command: '%s'\n", Command.c_str());
-	TWFunc::Exec_Cmd(Command, result);
+	TWFunc::Exec_Cmd(Command);
 	return true;
 }
 
 bool TWPartition::Restore_Flash_Image(string restore_folder) {
-	string Full_FileName, Command, result;
+	string Full_FileName, Command;
 
 	gui_print("Restoring %s...\n", Display_Name.c_str());
 	Full_FileName = restore_folder + "/" + Backup_FileName;
 	// Sometimes flash image doesn't like to flash due to the first 2KB matching, so we erase first to ensure that it flashes
 	Command = "erase_image " + MTD_Name;
 	LOGINFO("Erase command: '%s'\n", Command.c_str());
-	TWFunc::Exec_Cmd(Command, result);
+	TWFunc::Exec_Cmd(Command);
 	Command = "flash_image " + MTD_Name + " '" + Full_FileName + "'";
 	LOGINFO("Restore command: '%s'\n", Command.c_str());
-	TWFunc::Exec_Cmd(Command, result);
+	TWFunc::Exec_Cmd(Command);
 	return true;
 }
 
diff --git a/partitionmanager.cpp b/partitionmanager.cpp
index 4e72117..ca93a2a 100644
--- a/partitionmanager.cpp
+++ b/partitionmanager.cpp
@@ -1635,8 +1635,8 @@
 		if (!SDext->UnMount(true))
 			return false;
 	}
-	string result;
-	TWFunc::Exec_Cmd("umount \"$SWAPPATH\"", result);
+
+	TWFunc::Exec_Cmd("umount \"$SWAPPATH\"");
 	Device = SDCard->Actual_Block_Device;
 	// Just use the root block device
 	Device.resize(strlen("/dev/block/mmcblkX"));
@@ -1688,7 +1688,7 @@
 	gui_print("Removing partition table...\n");
 	Command = "parted -s " + Device + " mklabel msdos";
 	LOGINFO("Command is: '%s'\n", Command.c_str());
-	if (TWFunc::Exec_Cmd(Command, result) != 0) {
+	if (TWFunc::Exec_Cmd(Command) != 0) {
 		LOGERR("Unable to remove partition table.\n");
 		Update_System_Details();
 		return false;
@@ -1696,7 +1696,7 @@
 	gui_print("Creating FAT32 partition...\n");
 	Command = "parted " + Device + " mkpartfs primary fat32 0 " + fat_str + "MB";
 	LOGINFO("Command is: '%s'\n", Command.c_str());
-	if (TWFunc::Exec_Cmd(Command, result) != 0) {
+	if (TWFunc::Exec_Cmd(Command) != 0) {
 		LOGERR("Unable to create FAT32 partition.\n");
 		return false;
 	}
@@ -1704,7 +1704,7 @@
 		gui_print("Creating EXT partition...\n");
 		Command = "parted " + Device + " mkpartfs primary ext2 " + fat_str + "MB " + ext_str + "MB";
 		LOGINFO("Command is: '%s'\n", Command.c_str());
-		if (TWFunc::Exec_Cmd(Command, result) != 0) {
+		if (TWFunc::Exec_Cmd(Command) != 0) {
 			LOGERR("Unable to create EXT partition.\n");
 			Update_System_Details();
 			return false;
@@ -1714,7 +1714,7 @@
 		gui_print("Creating swap partition...\n");
 		Command = "parted " + Device + " mkpartfs primary linux-swap " + ext_str + "MB " + swap_str + "MB";
 		LOGINFO("Command is: '%s'\n", Command.c_str());
-		if (TWFunc::Exec_Cmd(Command, result) != 0) {
+		if (TWFunc::Exec_Cmd(Command) != 0) {
 			LOGERR("Unable to create swap partition.\n");
 			Update_System_Details();
 			return false;
@@ -1749,7 +1749,7 @@
 		Command = "mke2fs -t " + ext_format + " -m 0 " + SDext->Actual_Block_Device;
 		gui_print("Formatting sd-ext as %s...\n", ext_format.c_str());
 		LOGINFO("Formatting sd-ext after partitioning, command: '%s'\n", Command.c_str());
-		TWFunc::Exec_Cmd(Command, result);
+		TWFunc::Exec_Cmd(Command);
 	}
 
 	Update_System_Details();
diff --git a/recovery.cpp b/recovery.cpp
index 9308eec..28c26ce 100644
--- a/recovery.cpp
+++ b/recovery.cpp
@@ -997,13 +997,12 @@
 #ifdef TW_INCLUDE_INJECTTWRP
 	// Back up TWRP Ramdisk if needed:
 	TWPartition* Boot = PartitionManager.Find_Partition_By_Path("/boot");
-	string result;
 	LOGI("Backing up TWRP ramdisk...\n");
 	if (Boot == NULL || Boot->Current_File_System != "emmc")
-		TWFunc::Exec_Cmd("injecttwrp --backup /tmp/backup_recovery_ramdisk.img", result);
+		TWFunc::Exec_Cmd("injecttwrp --backup /tmp/backup_recovery_ramdisk.img");
 	else {
 		string injectcmd = "injecttwrp --backup /tmp/backup_recovery_ramdisk.img bd=" + Boot->Actual_Block_Device;
-		TWFunc::Exec_Cmd(injectcmd, result);
+		TWFunc::Exec_Cmd(injectcmd);
 	}
 	LOGI("Backup of TWRP ramdisk done.\n");
 #endif
diff --git a/twrp-functions.cpp b/twrp-functions.cpp
index 2329972..e468655 100644
--- a/twrp-functions.cpp
+++ b/twrp-functions.cpp
@@ -35,7 +35,7 @@
 }
 
 /* Execute a command */
-int TWFunc::Exec_Cmd(string cmd, string &result) {
+int TWFunc::Exec_Cmd(const string& cmd, string &result) {
 	FILE* exec;
 	char buffer[130];
 	int ret = 0;
@@ -53,6 +53,28 @@
 	return ret;
 }
 
+int TWFunc::Exec_Cmd(const string& cmd) {
+	pid_t pid;
+	int status;
+	switch(pid = fork())
+	{
+		case -1:
+			LOGERR("Exec_Cmd(): vfork failed!\n");
+			return -1;
+		case 0: // child
+			execl("/sbin/sh", "sh", "-c", cmd.c_str(), NULL);
+			_exit(127);
+			break;
+		default:
+		{
+			if (TWFunc::Wait_For_Child(pid, &status, cmd) != 0)
+				return -1;
+			else
+				return 0;
+		}
+	}
+}
+
 // Returns "file.name" from a full /path/to/file.name
 string TWFunc::Get_Filename(string Path) {
 	size_t pos = Path.find_last_of("/");
@@ -130,21 +152,19 @@
 }
 
 void TWFunc::htc_dumlock_restore_original_boot(void) {
-	string status;
 	if (!PartitionManager.Mount_By_Path("/sdcard", true))
 		return;
 
 	gui_print("Restoring original boot...\n");
-	Exec_Cmd("htcdumlock restore", status);
+	Exec_Cmd("htcdumlock restore");
 	gui_print("Original boot restored.\n");
 }
 
 void TWFunc::htc_dumlock_reflash_recovery_to_boot(void) {
-	string status;
 	if (!PartitionManager.Mount_By_Path("/sdcard", true))
 		return;
 	gui_print("Reflashing recovery to boot...\n");
-	Exec_Cmd("htcdumlock recovery noreboot", status);
+	Exec_Cmd("htcdumlock recovery noreboot");
 	gui_print("Recovery is flashed to boot.\n");
 }
 
@@ -337,11 +357,10 @@
 {
 	// Check for and run startup script if script exists
 	struct stat st;
-	string result;
 	if (stat(script_file, &st) == 0) {
 		gui_print("Running %s script...\n", display_name);
 		chmod(script_file, S_IRWXU | S_IRGRP | S_IXGRP | S_IROTH | S_IXOTH);
-		TWFunc::Exec_Cmd(script_file, result);
+		TWFunc::Exec_Cmd(script_file);
 		gui_print("\nFinished running %s script.\n", display_name);
 	}
 }
@@ -738,12 +757,10 @@
 }
 
 bool TWFunc::Install_SuperSU(void) {
-	string status;
-
 	if (!PartitionManager.Mount_By_Path("/system", true))
 		return false;
 
-	TWFunc::Exec_Cmd("/sbin/chattr -i /system/xbin/su", status);
+	TWFunc::Exec_Cmd("/sbin/chattr -i /system/xbin/su");
 	if (copy_file("/supersu/su", "/system/xbin/su", 0755) != 0) {
 		LOGERR("Failed to copy su binary to /system/bin\n");
 		return false;
@@ -751,24 +768,24 @@
 	if (!Path_Exists("/system/bin/.ext")) {
 		mkdir("/system/bin/.ext", 0777);
 	}
-	TWFunc::Exec_Cmd("/sbin/chattr -i /system/bin/.ext/su", status);
+	TWFunc::Exec_Cmd("/sbin/chattr -i /system/bin/.ext/su");
 	if (copy_file("/supersu/su", "/system/bin/.ext/su", 0755) != 0) {
 		LOGERR("Failed to copy su binary to /system/bin/.ext/su\n");
 		return false;
 	}
-	TWFunc::Exec_Cmd("/sbin/chattr -i /system/xbin/daemonsu", status);
+	TWFunc::Exec_Cmd("/sbin/chattr -i /system/xbin/daemonsu");
 	if (copy_file("/supersu/su", "/system/xbin/daemonsu", 0755) != 0) {
 		LOGERR("Failed to copy su binary to /system/xbin/daemonsu\n");
 		return false;
 	}
 	if (Path_Exists("/system/etc/init.d")) {
-		TWFunc::Exec_Cmd("/sbin/chattr -i /system/etc/init.d/99SuperSUDaemon", status);
+		TWFunc::Exec_Cmd("/sbin/chattr -i /system/etc/init.d/99SuperSUDaemon");
 		if (copy_file("/supersu/99SuperSUDaemon", "/system/etc/init.d/99SuperSUDaemon", 0755) != 0) {
 			LOGERR("Failed to copy 99SuperSUDaemon to /system/etc/init.d/99SuperSUDaemon\n");
 			return false;
 		}
 	} else {
-		TWFunc::Exec_Cmd("/sbin/chattr -i /system/etc/install-recovery.sh", status);
+		TWFunc::Exec_Cmd("/sbin/chattr -i /system/etc/install-recovery.sh");
 		if (copy_file("/supersu/install-recovery.sh", "/system/etc/install-recovery.sh", 0755) != 0) {
 			LOGERR("Failed to copy install-recovery.sh to /system/etc/install-recovery.sh\n");
 			return false;
@@ -997,4 +1014,4 @@
 	}
 	if (!mount_state)
 		PartitionManager.UnMount_By_Path("/system", false);
-}
\ No newline at end of file
+}
diff --git a/twrp-functions.hpp b/twrp-functions.hpp
index b3019bd..19ca10b 100644
--- a/twrp-functions.hpp
+++ b/twrp-functions.hpp
@@ -37,7 +37,8 @@
 	static void Update_Intent_File(string Intent);                              // Updates intent file
 	static int tw_reboot(RebootCommand command);                                // Prepares the device for rebooting
 	static void check_and_run_script(const char* script_file, const char* display_name); // checks for the existence of a script, chmods it to 755, then runs it
-	static int Exec_Cmd(string cmd, string &result); //execute a command and return the result as a string by reference
+	static int Exec_Cmd(const string& cmd, string &result); //execute a command and return the result as a string by reference
+	static int Exec_Cmd(const string& cmd); //execute a command
 	static int removeDir(const string path, bool removeParent); //recursively remove a directory
 	static int copy_file(string src, string dst, int mode); //copy file from src to dst with mode permissions
 	static unsigned int Get_D_Type_From_Stat(string Path);                      // Returns a dirent dt_type value using stat instead of dirent
diff --git a/twrp.cpp b/twrp.cpp
index 57e1657..765cad3 100644
--- a/twrp.cpp
+++ b/twrp.cpp
@@ -187,13 +187,12 @@
 #ifdef TW_INCLUDE_INJECTTWRP
 	// Back up TWRP Ramdisk if needed:
 	TWPartition* Boot = PartitionManager.Find_Partition_By_Path("/boot");
-	string result;
 	LOGINFO("Backing up TWRP ramdisk...\n");
 	if (Boot == NULL || Boot->Current_File_System != "emmc")
-		TWFunc::Exec_Cmd("injecttwrp --backup /tmp/backup_recovery_ramdisk.img", result);
+		TWFunc::Exec_Cmd("injecttwrp --backup /tmp/backup_recovery_ramdisk.img");
 	else {
 		string injectcmd = "injecttwrp --backup /tmp/backup_recovery_ramdisk.img bd=" + Boot->Actual_Block_Device;
-		TWFunc::Exec_Cmd(injectcmd, result);
+		TWFunc::Exec_Cmd(injectcmd);
 	}
 	LOGINFO("Backup of TWRP ramdisk done.\n");
 #endif
