diff --git a/indra/llmath/lloctree.h b/indra/llmath/lloctree.h
index 276f7b0f063dff188981f970e0e989d717598c3f..fdfc24f8b7fbe14c676904d914652f4acb03d213 100644
--- a/indra/llmath/lloctree.h
+++ b/indra/llmath/lloctree.h
@@ -294,10 +294,8 @@ class LLOctreeNode : public LLTreeNode<T>
 		//is it here?
 		if (isInside(data->getPositionGroup()))
 		{
-			if (getElementCount() < LL_OCTREE_MAX_CAPACITY &&
-				(contains(data->getBinRadius()) ||
-				(data->getBinRadius() > getSize()[0] &&
-				parent && parent->getElementCount() >= LL_OCTREE_MAX_CAPACITY))) 
+			if ((getElementCount() < LL_OCTREE_MAX_CAPACITY && contains(data->getBinRadius()) ||
+				(data->getBinRadius() > getSize()[0] &&	parent && parent->getElementCount() >= LL_OCTREE_MAX_CAPACITY))) 
 			{ //it belongs here
 #if LL_OCTREE_PARANOIA_CHECK
 				//if this is a redundant insertion, error out (should never happen)
@@ -359,7 +357,7 @@ class LLOctreeNode : public LLTreeNode<T>
 				//make sure no existing node matches this position
 				for (U32 i = 0; i < getChildCount(); i++)
 				{
-					if (mChild[i]->getCenter().equal3(center))
+					if (mChild[i]->getCenter().equals3(center))
 					{
 						OCT_ERRS << "Octree detected duplicate child center and gave up." << llendl;
 						return false;
@@ -488,18 +486,18 @@ class LLOctreeNode : public LLTreeNode<T>
 	{
 #if LL_OCTREE_PARANOIA_CHECK
 
-		if (child->getSize().equal3(getSize()))
+		if (child->getSize().equals3(getSize()))
 		{
 			OCT_ERRS << "Child size is same as parent size!" << llendl;
 		}
 
 		for (U32 i = 0; i < getChildCount(); i++)
 		{
-			if(!mChild[i]->getSize().equal3(child->getSize())) 
+			if(!mChild[i]->getSize().equals3(child->getSize())) 
 			{
 				OCT_ERRS <<"Invalid octree child size." << llendl;
 			}
-			if (mChild[i]->getCenter().equal3(child->getCenter()))
+			if (mChild[i]->getCenter().equals3(child->getCenter()))
 			{
 				OCT_ERRS <<"Duplicate octree child position." << llendl;
 			}
diff --git a/indra/newview/llappviewer.cpp b/indra/newview/llappviewer.cpp
index 7e8c68632d886a841c874fa68087458503afbc1b..e23b3732a8ea115735456a7122c1794f151a19c2 100644
--- a/indra/newview/llappviewer.cpp
+++ b/indra/newview/llappviewer.cpp
@@ -482,6 +482,7 @@ static void settings_to_globals()
 static void settings_modify()
 {
 	LLRenderTarget::sUseFBO				= gSavedSettings.getBOOL("RenderDeferred");
+	LLPipeline::sRenderDeferred			= gSavedSettings.getBOOL("RenderDeferred");
 	LLVOAvatar::sUseImpostors			= gSavedSettings.getBOOL("RenderUseImpostors");
 	LLVOSurfacePatch::sLODFactor		= gSavedSettings.getF32("RenderTerrainLODFactor");
 	LLVOSurfacePatch::sLODFactor *= LLVOSurfacePatch::sLODFactor; //square lod factor to get exponential range of [1,4]
diff --git a/indra/newview/llviewercontrol.cpp b/indra/newview/llviewercontrol.cpp
index 444d5cb902dce9fbbf96f5abbd49deefc25fa6cb..9bf0ae7c3e0f89aade08d74620422d32851b1b27 100644
--- a/indra/newview/llviewercontrol.cpp
+++ b/indra/newview/llviewercontrol.cpp
@@ -380,6 +380,7 @@ static bool handleRenderDeferredChanged(const LLSD& newvalue)
 		gPipeline.updateRenderDeferred();
 		gPipeline.releaseGLBuffers();
 		gPipeline.createGLBuffers();
+		gPipeline.resetVertexBuffers();
 		if (LLPipeline::sRenderDeferred && LLRenderTarget::sUseFBO)
 		{
 			LLViewerShaderMgr::instance()->setShaders();