 Thread, NoTimers, false
 
 	if (IsCurrentBatchRunning(currBatchNo, PrgListPID%btchPrgPresetSel%))
+	{
 	batchActive := 1
+	GuiControl, PrgLnch:, RunBatchPrg, &Cancel Batch
+	waitBreak := 0
+	}
 	else
 	batchActive := 0
 
-	if (batchActive)
-	{
-	GuiControl, PrgLnch:, RunBatchPrg, &Cancel Batch
-	waitBreak := 0
-
-	if (temp := RevertResLastPrgProc(maxBatchPrgs, PrgMonPID, (lnchPrgIndex > 0)? 0: 1))
-	{
-		if (DefResNoMatchRes())
-		{
+	if (temp := RevertResLastPrgProc(maxBatchPrgs, PrgMonPID, (lnchPrgIndex > 0)? 1: 0))
+	{
+		if (PrgChgResPrgOnClose[abs(lnchPrgIndex)] && DefResNoMatchRes())
+		{
+			if (lnchPrgIndex < 0)
+			RevertResdefaults()
 		ChangeResolution(dispMonNames, regoVar, temp)
 		sleep, 1000
 		}
 	}
 
 
+	if (batchActive)
 	SetTimer, WatchSwitchOut, %timWatchSwitch%
-	}
 	else
 	{
 	CleanupPID(currBatchNo, PrgLnch.Monitor, lastMonitorUsedInBatch, PrgMonToRn, presetNoTest, PrgListPID%btchPrgPresetSel%, PrgStyle, dx, dy, PrgBordless, PrgLnchHide, PrgPID, selPrgChoice, dispMonNames, regoVar, waitBreak, 1)

						if (timerfTemp)
						{
						Process, Exist, % timerfTemp
							if (ErrorLevel)
							{
							timerTemp .= "Active" . "|"
							timerBtch := PrgBatchIni%btchPrgPresetSel%[A_Index]
							lastMonitorUsedInBatch := PrgMontoRn[timerBtch]
							}
							else
							{
								if (!PrgMonPID.delete(timerfTemp))
								{
								timerBtch := PrgBatchIni%btchPrgPresetSel%[A_Index]
								MsgBox, 8192, PID Check, % "PID for " . PrgChoiceNames[timerBtch] . " never existed!"
								}
							PrgListPID%btchPrgPresetSel%[A_Index] := "ENDED"

dx := 0
dy := 0


	if (!A_IsUnicode)
	msgbox, 8192 , Task Dialogs, Chinese Characters in ANSI Task Dialogs!


;Done here, else complications with PrgLnch.Monitor
Gui, PrgLnchOpt: New

