diff --git a/indra/cmake/LLCommon.cmake b/indra/cmake/LLCommon.cmake
index d1ab264a413b8a3eaf263ea3bbef32e59ac42e9c..c10fa630498b33d73060299eb86b3c3cdf4f97f3 100644
--- a/indra/cmake/LLCommon.cmake
+++ b/indra/cmake/LLCommon.cmake
@@ -13,7 +13,11 @@ set(LLCOMMON_INCLUDE_DIRS
     ${Boost_INCLUDE_DIRS}
     )
 
-set(LLCOMMON_LIBRARIES llcommon)
+if (WINDOWS)
+   set(LLCOMMON_LIBRARIES llcommon iphlpapi)
+else (WINDOWS)
+   set(LLCOMMON_LIBRARIES llcommon)
+endif (WINDOWS)
 
 add_definitions(${TCMALLOC_FLAG})
 
diff --git a/indra/cmake/Linking.cmake b/indra/cmake/Linking.cmake
index fca0cdd2d2ea44b20ded56e0b86f5176c98e2b20..bca99caf2a521b0c4284c6cb36c449262f5a1857 100644
--- a/indra/cmake/Linking.cmake
+++ b/indra/cmake/Linking.cmake
@@ -48,7 +48,6 @@ if (WINDOWS)
       wldap32
       gdi32
       user32
-      iphlpapi
       dbghelp
       )
 else (WINDOWS)
diff --git a/indra/newview/llappearancemgr.cpp b/indra/newview/llappearancemgr.cpp
index 71df064236791a1d4fb3adc1f303870c31e01520..c03cd5810bef71affde4d1948f3de2f3a49a0a10 100644
--- a/indra/newview/llappearancemgr.cpp
+++ b/indra/newview/llappearancemgr.cpp
@@ -310,7 +310,7 @@ LLUpdateAppearanceOnDestroy::~LLUpdateAppearanceOnDestroy()
 {
 	llinfos << "done update appearance on destroy" << llendl;
 	
-	if (!LLApp::isExiting())
+	if (!LLApp::isExiting() && !LLApp::isStopped())
 	{
 		LLAppearanceManager::instance().updateAppearanceFromCOF();
 	}
diff --git a/indra/newview/llsechandler_basic.cpp b/indra/newview/llsechandler_basic.cpp
index d41ec96ab64fb29b289706ecbde319a0ff72a2fd..51e250ffc6b6c5b55cf5aa755f6e5cf50ee5a9f6 100644
--- a/indra/newview/llsechandler_basic.cpp
+++ b/indra/newview/llsechandler_basic.cpp
@@ -387,7 +387,7 @@ std::string cert_string_from_octet_string(ASN1_OCTET_STRING* value)
 	
 	std::stringstream result;
 	result << std::hex << std::setprecision(2);
-	for (unsigned int i=0; i < value->length; i++)
+	for (int i=0; i < value->length; i++)
 	{
 		if (i != 0) 
 		{