diff --git a/indra/llmath/llvolume.cpp b/indra/llmath/llvolume.cpp
index a0874e859cdded740e2065fd06db7802fab6d397..2411bb7900123ed5e468089eaad22a5f27f9ffab 100644
--- a/indra/llmath/llvolume.cpp
+++ b/indra/llmath/llvolume.cpp
@@ -92,11 +92,13 @@ extern BOOL gDebugGL;
 
 void assert_aligned(void* ptr, U32 alignment)
 {
+#if 0
 	U32 t = (U32) ptr;
 	if (t%alignment != 0)
 	{
 		llerrs << "WTF?" << llendl;
 	}
+#endif
 }
 
 BOOL check_same_clock_dir( const LLVector3& pt1, const LLVector3& pt2, const LLVector3& pt3, const LLVector3& norm)
@@ -6600,6 +6602,12 @@ BOOL LLVolumeFace::createSide(LLVolume* volume, BOOL partial_build)
 		}
 	}
 
+	//clear normals
+	for (U32 i = 0; i < mNumVertices; i++)
+	{
+		mNormals[i].clear();
+	}
+
 	//generate normals 
 	for (U32 i = 0; i < mNumIndices/3; i++) //for each triangle
 	{
diff --git a/indra/newview/llface.cpp b/indra/newview/llface.cpp
index 4de61964c70a5ef2cc781ea6c57ee80f7dfd7eec..f5a04c8c81d029c938e4ab812a23e2c9680af983 100644
--- a/indra/newview/llface.cpp
+++ b/indra/newview/llface.cpp
@@ -1665,6 +1665,11 @@ BOOL LLFace::getGeometryVolume(const LLVolume& volume,
 
 		LLVector4a* dst = (LLVector4a*) colors.get();
 		S32 num_vecs = num_vertices/4;
+		if (num_vertices%4 > 0)
+		{
+			++num_vecs;
+		}
+
 		for (S32 i = 0; i < num_vecs; i++)
 		{	
 			dst[i] = src;
diff --git a/indra/newview/llviewercontrol.cpp b/indra/newview/llviewercontrol.cpp
index 131c712241ed075d2902747dec29bd58cda38cec..13dee0c7b7d0dac6d825f31d56993d710c42ead2 100644
--- a/indra/newview/llviewercontrol.cpp
+++ b/indra/newview/llviewercontrol.cpp
@@ -123,7 +123,10 @@ static bool handleSetShaderChanged(const LLSD& newvalue)
 
 static bool handleLightingDetailChanged(const LLSD& newvalue)
 {
-	gPipeline.setLightingDetail(-1);
+	if (gPipeline.isInit())
+	{
+		gPipeline.setLightingDetail(-1);
+	}
 	return true;
 }