diff --git a/indra/newview/llinventorybridge.cpp b/indra/newview/llinventorybridge.cpp
index 2ae742e28a835cfd9c81ffb4128ba2155ffd2594..7310e63713f61548743b58b5aa711b1a54292a30 100644
--- a/indra/newview/llinventorybridge.cpp
+++ b/indra/newview/llinventorybridge.cpp
@@ -7502,8 +7502,6 @@ void LLSettingsBridge::buildContextMenu(LLMenuGL& menu, U32 flags)
 
     if (isMarketplaceListingsFolder())
     {
-        menuentry_vec_t items;
-        menuentry_vec_t disabled_items;
         addMarketplaceContextMenuOptions(flags, items, disabled_items);
         items.push_back(std::string("Properties"));
         getClipboardEntries(false, items, disabled_items, flags);
@@ -8060,7 +8058,7 @@ void LLFolderViewGroupedItemBridge::groupFilterContextMenu(folder_view_item_dequ
 	menuentry_vec_t disabled_items;
     if (get_selection_item_uuids(selected_items, ids))
     {
-		if (!LLAppearanceMgr::instance().canAddWearables(ids) && canWearSelected(ids))
+		if (!canWearSelected(ids) || !LLAppearanceMgr::instance().canAddWearables(ids))
         {
             disabled_items.push_back(std::string("Wearable And Object Wear"));
             disabled_items.push_back(std::string("Wearable Add"));
@@ -8076,7 +8074,7 @@ bool LLFolderViewGroupedItemBridge::canWearSelected(const uuid_vec_t& item_ids)
 	for (uuid_vec_t::const_iterator it = item_ids.begin(); it != item_ids.end(); ++it)
 	{
 		const LLViewerInventoryItem* item = gInventory.getItem(*it);
-		if (!item || (item->getType() >= LLAssetType::AT_COUNT) || (item->getType() <= LLAssetType::AT_NONE))
+		if (!item || (item->getType() != LLAssetType::AT_CLOTHING && item->getType() != LLAssetType::AT_OBJECT && item->getType() != LLAssetType::AT_BODYPART && item->getType() != LLAssetType::AT_GESTURE))
 		{
 			return false;
 		}
diff --git a/indra/newview/llmarketplacefunctions.cpp b/indra/newview/llmarketplacefunctions.cpp
index 92c6bfa6f4aa5acad4fb9829555481538d32f292..b3df9d9ac7bd353e6ab5be5388935ea3332ccd51 100644
--- a/indra/newview/llmarketplacefunctions.cpp
+++ b/indra/newview/llmarketplacefunctions.cpp
@@ -214,7 +214,7 @@ namespace LLMarketplaceImport
         httpOpts->setFollowRedirects(true);
 
         httpHeaders->append(HTTP_OUT_HEADER_ACCEPT, "*/*");
-        httpHeaders->append(HTTP_OUT_HEADER_CONNECTION, "keep-alive");
+        httpHeaders->append(HTTP_OUT_HEADER_CONNECTION, "Keep-Alive");
         httpHeaders->append(HTTP_OUT_HEADER_COOKIE, sMarketplaceCookie);
         httpHeaders->append(HTTP_OUT_HEADER_CONTENT_TYPE, HTTP_CONTENT_XML);
         httpHeaders->append(HTTP_OUT_HEADER_USER_AGENT, LLViewerMedia::getInstanceFast()->getCurrentUserAgent());
diff --git a/indra/newview/llvoavatar.cpp b/indra/newview/llvoavatar.cpp
index 6c33a01677488252e898a18a2fbf338fc25035c7..ff3f910803e4c44412aa1116a549183236f3d947 100644
--- a/indra/newview/llvoavatar.cpp
+++ b/indra/newview/llvoavatar.cpp
@@ -769,14 +769,14 @@ LLVOAvatar::LLVOAvatar(const LLUUID& id,
 S32 LLVOAvatar::getNumBakes() const 
 {
 	// BAKED_LEFT_ARM is equal to the pre-BOM BAKED_NUM_INDICES
-	if(getRegion())
+	if(LLViewerRegion* regionp = getRegion())
 	{
 		// LL_INFOS("BOMOS") 
 		// 				<< getFullname()
 		// 				<< "Using avatar region settings [" << getRegion()->getName() << "]"
 		// 				<< " bakesOnMesh = " << static_cast<const char *>(getRegion()->bakesOnMeshEnabled()?"True":"False")
 		// 				<< LL_ENDL;
-		return getRegion()->getRegionMaxBakes();
+		return regionp->getRegionMaxBakes();
 	}
 	// LL_INFOS("BOMOS") 
 	// 				<< " Using fallback settings"