diff --git a/indra/llcommon/llapr.cpp b/indra/llcommon/llapr.cpp
index d911f258b6338be48de8a142b5b5ed5d4e8b55b6..8a8791131572f6b58a8ae43607cfcbdbe86c421b 100644
--- a/indra/llcommon/llapr.cpp
+++ b/indra/llcommon/llapr.cpp
@@ -60,7 +60,7 @@ void ll_init_apr()
 }
 
 
-void ll_cleanup_apr()
+void ll_cleanup_apr(bool destroy_pools)
 {
 	LL_INFOS("APR") << "Cleaning up APR" << LL_ENDL;
 
@@ -83,7 +83,7 @@ void ll_cleanup_apr()
 
 	LLThreadLocalPointerBase::destroyAllThreadLocalStorage();
 
-	if (gAPRPoolp)
+	if (gAPRPoolp && destroy_pools)
 	{
 		apr_pool_destroy(gAPRPoolp);
 		gAPRPoolp = NULL;
diff --git a/indra/llcommon/llapr.h b/indra/llcommon/llapr.h
index b3c9bfd58c632d47f396e37e17853323da5b7339..424ddc6505be80e79b07c54a70ee09e87f82bcb8 100644
--- a/indra/llcommon/llapr.h
+++ b/indra/llcommon/llapr.h
@@ -70,7 +70,7 @@ void LL_COMMON_API ll_init_apr();
 /** 
  * @brief Cleanup those common apr constructs.
  */
-void LL_COMMON_API ll_cleanup_apr();
+void LL_COMMON_API ll_cleanup_apr(bool destroy_pools = true);
 
 //
 //LL apr_pool
diff --git a/indra/llcommon/lltracethreadrecorder.cpp b/indra/llcommon/lltracethreadrecorder.cpp
index 9fb789c62d3a12dfe31edb6db300ce6d38afaf74..7b493a651eda90512704d811cbbeec94ec411ea3 100644
--- a/indra/llcommon/lltracethreadrecorder.cpp
+++ b/indra/llcommon/lltracethreadrecorder.cpp
@@ -127,7 +127,7 @@ std::list<ThreadRecorder::ActiveRecording>::iterator ThreadRecorder::update( Rec
 
 	if (it == end_it)
 	{
-		llerrs << "Recording not active on this thread" << llendl;
+		llwarns << "Recording not active on this thread" << llendl;
 	}
 
 	return it;
diff --git a/indra/llimage/tests/llimageworker_test.cpp b/indra/llimage/tests/llimageworker_test.cpp
index 29497257ac7951a7ed062550855fb1f76176cafd..4118896768fbd21e9e519a2d06603fe02c564175 100644
--- a/indra/llimage/tests/llimageworker_test.cpp
+++ b/indra/llimage/tests/llimageworker_test.cpp
@@ -44,6 +44,9 @@
 // * Do not make any assumption as to how those classes or methods work (i.e. don't copy/paste code)
 // * A simulator for a class can be implemented here. Please comment and document thoroughly.
 
+LLTrace::MemStat	LLImageBase::sMemStat("LLImage");
+
+
 LLImageBase::LLImageBase() 
 : mData(NULL),
 mDataSize(0),
diff --git a/indra/llkdu/tests/llimagej2ckdu_test.cpp b/indra/llkdu/tests/llimagej2ckdu_test.cpp
index 62c245f125b78bafeee2dda6db0ea138e21fcdcf..c28f121eb8209302d88ab9501c558937efdea0f7 100755
--- a/indra/llkdu/tests/llimagej2ckdu_test.cpp
+++ b/indra/llkdu/tests/llimagej2ckdu_test.cpp
@@ -43,7 +43,9 @@
 
 // End Stubbing
 // -------------------------------------------------------------------------------------------
-// Stubb the LL Image Classes
+// Stub the LL Image Classes
+LLTrace::MemStat	LLImageBase::sMemStat("LLImage");
+
 LLImageRaw::LLImageRaw() { }
 LLImageRaw::~LLImageRaw() { }
 U8* LLImageRaw::allocateData(S32 ) { return NULL; }
diff --git a/indra/llmessage/llproxy.cpp b/indra/llmessage/llproxy.cpp
index 9988fcd9c0f6abac1d2776c04a3db8721a6b21ce..aa474fabd2bbbe2c3034a7a40e2062a977567dbd 100644
--- a/indra/llmessage/llproxy.cpp
+++ b/indra/llmessage/llproxy.cpp
@@ -57,8 +57,7 @@ LLProxy::LLProxy():
 		mAuthMethodSelected(METHOD_NOAUTH),
 		mSocksUsername(),
 		mSocksPassword()
-{
-}
+{}
 
 LLProxy::~LLProxy()
 {
diff --git a/indra/test/test.cpp b/indra/test/test.cpp
index 8bd302ce7a9a9eb9967bc8b9f7d7ddfb40c118bb..d75040393cc749723213bdb926a1ef464fb85f7f 100644
--- a/indra/test/test.cpp
+++ b/indra/test/test.cpp
@@ -643,7 +643,7 @@ int main(int argc, char **argv)
 		s.close();
 	}
 
-	ll_cleanup_apr();
+	ll_cleanup_apr(false);
 
 	int retval = (success ? 0 : 1);
 	return retval;