 
 	<cfif !hasPlugin || (structKeyExists(session, "alwaysNew") && session.alwaysNew)>
 		<cfif !hasPlugin>
-		<cfset plugin=struct(
-			label:"Plugins",
-			children:plugins,
-			action:"plugin"
-		)>
-		<cfset navigation[arrayLen(navigation)+1]=plugin>
+			<cfset plugin=struct(
+				label:"Plugins",
+				children:plugins,
+				action:"plugin"
+			)>
+			<cfset navigation[arrayLen(navigation)+1]=plugin>
 		</cfif>
 
 		<cfset sctNav={}>
 		<cfloop array="#navigation#" index="item">
 			<cfset sctNav[item.action]=item>
 		</cfloop>
-
-		<cfdirectory directory="#plugindir#" action="list" name="plugindirs" recurse="no">
-		<cfloop query="plugindirs">
-			<cfif plugindirs.type == "dir">
-				<cfset _lang=loadPluginLanguage(pluginDir,plugindirs.name)>
-				<cfif isNull(_lang.__group)>
-					<cfcontinue>
+		<cfloop list=#mappings.keyList()# item="_pluginDir">
+			<cfdirectory directory="#_plugindir#" action="list" name="plugindirs" recurse="no">
+			<cfloop query="plugindirs">
+				<cfif plugindirs.type == "dir">
+					<cfset _lang=loadPluginLanguage(_pluginDir,plugindirs.name)>
+					
+					<cfif isNull(_lang.__group)>
+						<cfcontinue>
+					</cfif>
+					<cfset _act=_lang.__action>
+					<cfset _group=_lang.__group>
+					<cfset _pos=_lang.__position>
+					<cfset structDelete(_lang,"__action",false)>
+
+					<cfset application.pluginLanguage[session.lucee_admin_lang][plugindirs.name]=_lang>
+
+					<cfset item=struct(
+						label:_lang.title,
+						action:plugindirs.name,
+						_action:'plugin&plugin='&plugindirs.name
+					)>
+
+					<cfif !structKeyExists(sctNav,_act)>
+						<cfset sctNav[_act]=struct(
+							label:_group,
+							children:[],
+							action:_act
+						)>
+						<cfif _pos GT 0 && _pos LTE arrayLen(navigation)>
+							<cfscript>
+							for(i=arrayLen(navigation)+1;i>_pos;i--){
+								navigation[i]=navigation[i-1];
+							}
+							navigation[_pos]=sctNav[_act];
+							</cfscript>
+						<cfelse>
+							<cfset navigation[arrayLen(navigation)+1]=sctNav[_act]>
+						</cfif>
+
+					</cfif>
+
+					<cfset children=sctNav[_act].children>
+					<cfset isUpdate=false>
+					<cfloop from="1" to="#arrayLen(children)#" index="i">
+						<cfif children[i].action == item.action>
+							<cfset children[i]=item>
+							<cfset isUpdate=true>
+						</cfif>
+					</cfloop>
+					<cfif !isUpdate>
+						<cfset children[arrayLen(children) + 1] = item>
+					</cfif>
 				</cfif>
-				<cfset _act=_lang.__action>
-				<cfset _group=_lang.__group>
-				<cfset _pos=_lang.__position>
-				<cfset structDelete(_lang,"__action",false)>
-
-				<cfset application.pluginLanguage[session.lucee_admin_lang][plugindirs.name]=_lang>
-
-				<cfset item=struct(
-					label:_lang.title,
-					action:plugindirs.name,
-					_action:'plugin&plugin='&plugindirs.name
-				)>
-
-				<cfif !structKeyExists(sctNav,_act)>
-					<cfset sctNav[_act]=struct(
-						label:_group,
-						children:[],
-						action:_act
-					)>
-					<cfif _pos GT 0 && _pos LTE arrayLen(navigation)>
-						<cfscript>
-						for(i=arrayLen(navigation)+1;i>_pos;i--){
-							navigation[i]=navigation[i-1];
-						}
-						navigation[_pos]=sctNav[_act];
-						</cfscript>
-					<cfelse>
-						<cfset navigation[arrayLen(navigation)+1]=sctNav[_act]>
-					</cfif>
-
-				</cfif>
-
-				<cfset children=sctNav[_act].children>
-				<cfset isUpdate=false>
-				<cfloop from="1" to="#arrayLen(children)#" index="i">
-					<cfif children[i].action == item.action>
-						<cfset children[i]=item>
-						<cfset isUpdate=true>
-			</cfif>
-		</cfloop>
-				<cfif !isUpdate>
-					<cfset children[arrayLen(children) + 1] = item>
-	</cfif>
-
-</cfif>
+			</cfloop>
 		</cfloop>
 	</cfif>
 		<cfcatch><cfrethrow></cfcatch>
 	</cftry>
-
 </cfif>
 <cfsavecontent variable="arrow"><img src="resources/img/arrow.gif.cfm" width="4" height="7" /></cfsavecontent>
 <cfif structKeyExists(url, "action") && url.action == "plugin" && !structKeyExists(url, "plugin")>

	</cfif>
	<cfset var txtLanguage="">
	<cfset var xml="">
	<cfset var idx="">

	<cfif fileExists(fileLanguage)>
		<cffile action="read" file="#fileLanguage#" variable="txtLanguage" charset="utf-8">
		<cfxml casesensitive="no" variable="xml"><cfoutput>#txtLanguage#</cfoutput></cfxml>

		type="#request.adminType#"
		password="#session["password" & request.adminType]#"
		returnVariable="pluginDir">
	<cfset mappings = [:]>
	<cfset mappings['/lucee_plugin_directory/']=pluginDir>
	
	<cfif request.adminType eq "web">
		<cfset mappings['/lucee_server_plugin_directory/']=ExpandPath("{lucee-server}/context/admin/plugin")>
	</cfif>
	
	<cfapplication action="update" mappings="#mappings#">

	<cfset hasPlugin=false>
