diff --git a/indra/newview/llinventorymodel.cpp b/indra/newview/llinventorymodel.cpp
index 711114173c915b98e5bdb73d6914ca1f1a0ebdb4..89f5ef026a92c06aa9888d52ee69f9615941e7e9 100644
--- a/indra/newview/llinventorymodel.cpp
+++ b/indra/newview/llinventorymodel.cpp
@@ -1568,10 +1568,15 @@ void LLInventoryModel::bulkFetch(std::string url)
 				    folder_sd["fetch_folders"]	= TRUE; //(LLSD::Boolean)sFullFetchStarted;
 				    folder_sd["fetch_items"]	= (LLSD::Boolean)TRUE;
 				    
-				    if (ALEXANDRIA_LINDEN_ID == cat->getOwnerID())
-					    body_lib["folders"].append(folder_sd);
-				    else
+				    if (gAgent.getID() == cat->getOwnerID())
+				    {
 					    body["folders"].append(folder_sd);
+				    }
+				    else
+				    {
+					    body_lib["folders"].append(folder_sd);
+				    }
+
 				    folder_count++;
 			    }
 			    if (sMyInventoryFetchStarted ||
diff --git a/indra/newview/llpanellogin.cpp b/indra/newview/llpanellogin.cpp
index 7752750a311b950742545c4ec5303cfa46a8e075..906f091090f36055626915436d338789167acf31 100644
--- a/indra/newview/llpanellogin.cpp
+++ b/indra/newview/llpanellogin.cpp
@@ -871,7 +871,7 @@ void LLPanelLogin::loadLoginPage()
 	curl_free(curl_version);
 
 	// Grid
-	char* curl_grid = curl_escape(LLGridManager::getInstance()->getGridLabel().c_str(), 0);
+	char* curl_grid = curl_escape(LLGridManager::getInstance()->getGridID().c_str(), 0);
 	oStr << "&grid=" << curl_grid;
 	curl_free(curl_grid);
 	gViewerWindow->setMenuBackgroundColor(false, !LLGridManager::getInstance()->isInProductionGrid());
diff --git a/indra/newview/llsecapi.cpp b/indra/newview/llsecapi.cpp
index 26bdfd19da70a6dfb71704e9dacc81f5d5688ba6..a928b4580e0abc257452fece54e22c8f28fd723b 100644
--- a/indra/newview/llsecapi.cpp
+++ b/indra/newview/llsecapi.cpp
@@ -131,7 +131,7 @@ LLSD LLCredential::getLoginParams()
 	}
 	else if (mIdentifier["type"].asString() == "account")
 	{
-		result["username"] = mIdentifier["username"];
+		result["username"] = mIdentifier["account_name"];
 		result["passwd"] = mAuthenticator["secret"];
                                     
 	}
diff --git a/indra/newview/llviewerinventory.cpp b/indra/newview/llviewerinventory.cpp
index 5605f425e099c058d220abe5da5eb7c727bb4c88..df873f241e33d623e4c68e434615a9ed9d0afad2 100644
--- a/indra/newview/llviewerinventory.cpp
+++ b/indra/newview/llviewerinventory.cpp
@@ -35,7 +35,6 @@
 
 #include "llnotificationsutil.h"
 #include "message.h"
-#include "indra_constants.h"
 
 #include "llagent.h"
 #include "llviewerfoldertype.h"
@@ -242,10 +241,14 @@ void LLViewerInventoryItem::fetchFromServer(void) const
 		// we have to check region. It can be null after region was destroyed. See EXT-245
 		if (region)
 		{
-			if( ALEXANDRIA_LINDEN_ID.getString() == mPermissions.getOwner().getString())
-				url = region->getCapability("FetchLib");
-			else	
-				url = region->getCapability("FetchInventory");
+		  if(gAgent.getID() != mPermissions.getOwner())
+		    {
+		      url = region->getCapability("FetchLib");
+		    }
+		  else
+		    {	
+		      url = region->getCapability("FetchInventory");
+		    }
 		}
 		else
 		{