diff --git a/indra/newview/llavatarrenderinfoaccountant.cpp b/indra/newview/llavatarrenderinfoaccountant.cpp
index 595a5f02241aec651d295d9a3b55a31cdc21b644..03204ea48fcf8a9e2e0104d8600b49075821c19e 100644
--- a/indra/newview/llavatarrenderinfoaccountant.cpp
+++ b/indra/newview/llavatarrenderinfoaccountant.cpp
@@ -267,9 +267,10 @@ void LLAvatarRenderInfoAccountant::sendRenderInfoToRegion(LLViewerRegion * regio
 					avatar->calculateUpdateRenderComplexity();			// Make sure the numbers are up-to-date
 
 					LLSD info = LLSD::emptyMap();
-					if (avatar->getVisualComplexity() > 0)
+                    U32 avatar_complexity = avatar->getVisualComplexity();
+					if (avatar_complexity > 0)
 					{
-						info[KEY_WEIGHT] = avatar->getVisualComplexity();
+						info[KEY_WEIGHT] = (S32)(avatar_complexity < S32_MAX ? avatar_complexity : S32_MAX);
 						info[KEY_TOO_COMPLEX]  = LLSD::Boolean(avatar->isTooComplex());
 						agents[avatar->getID().asString()] = info;
 
diff --git a/indra/newview/llavatarrendernotifier.cpp b/indra/newview/llavatarrendernotifier.cpp
index c7fdf4cce413b82d6a7db313b803312256e35f37..2596035f953458a075277421c68239986ef80c0d 100644
--- a/indra/newview/llavatarrendernotifier.cpp
+++ b/indra/newview/llavatarrendernotifier.cpp
@@ -133,9 +133,10 @@ void LLAvatarRenderNotifier::updateNotification()
 		// next 'over limit' update should be displayed as soon as possible if there is anything noteworthy
 		mPopUpDelayTimer.resetWithExpiry(0);
 	}
-	else if ((mPopUpDelayTimer.hasExpired() || is_visible)
-		&& (mOverLimitPct > 0 || mLatestOverLimitPct > 0)
-		&& abs(mOverLimitPct - mLatestOverLimitPct) > mLatestOverLimitPct * RENDER_ALLOWED_CHANGE_PCT)
+	else if (   (mPopUpDelayTimer.hasExpired() || is_visible)
+		     && (mOverLimitPct > 0 || mLatestOverLimitPct > 0)
+             && std::abs(mOverLimitPct - mLatestOverLimitPct) > mLatestOverLimitPct * RENDER_ALLOWED_CHANGE_PCT
+             )
 	{
 		// display in case of drop to/from zero and in case of significant (RENDER_ALLOWED_CHANGE_PCT) changes
 		display_notification = true;
diff --git a/indra/newview/llspatialpartition.cpp b/indra/newview/llspatialpartition.cpp
index 5e342099d7c0dcc6b3756f8b3b7eecaffb68acef..11b619ba006ef9f9cde9d57d9421aac1d7b76ac9 100755
--- a/indra/newview/llspatialpartition.cpp
+++ b/indra/newview/llspatialpartition.cpp
@@ -862,10 +862,8 @@ void LLSpatialGroup::handleDestruction(const TreeNode* node)
 	{
 		if (bridge->mAvatar.notNull())
 		{
-			bridge->mAvatar->mAttachmentGeometryBytes -= mGeometryBytes;
-			bridge->mAvatar->mAttachmentGeometryBytes = llmax(bridge->mAvatar->mAttachmentGeometryBytes, 0);
-			bridge->mAvatar->mAttachmentSurfaceArea -= mSurfaceArea;
-			bridge->mAvatar->mAttachmentSurfaceArea = llmax(bridge->mAvatar->mAttachmentSurfaceArea, 0.f);
+			bridge->mAvatar->modifyAttachmentGeometryBytes( -mGeometryBytes );
+			bridge->mAvatar->modifyAttachmentSurfaceArea( -mSurfaceArea );
 		}
 	}
 
diff --git a/indra/newview/llvoavatar.cpp b/indra/newview/llvoavatar.cpp
index 86db3689c7145afc31bc9594bf234807ffa15cb7..303b677dcf572d6603a869f340230430f4756907 100755
--- a/indra/newview/llvoavatar.cpp
+++ b/indra/newview/llvoavatar.cpp
@@ -182,7 +182,7 @@ const F32 NAMETAG_UPDATE_THRESHOLD = 0.3f;
 const F32 NAMETAG_VERTICAL_SCREEN_OFFSET = 25.f;
 const F32 NAMETAG_VERT_OFFSET_WEIGHT = 0.17f;
 
-const S32 LLVOAvatar::VISUAL_COMPLEXITY_UNKNOWN = 0;
+const U32 LLVOAvatar::VISUAL_COMPLEXITY_UNKNOWN = 0;
 
 enum ERenderName
 {
@@ -668,8 +668,8 @@ LLVOAvatar::LLVOAvatar(const LLUUID& id,
 	LLAvatarAppearance(&gAgentWearables),
 	LLViewerObject(id, pcode, regionp),
 	mSpecialRenderMode(0),
-	mAttachmentGeometryBytes(-1),
-	mAttachmentSurfaceArea(-1.f),
+	mAttachmentGeometryBytes(0),
+	mAttachmentSurfaceArea(0.f),
 	mReportedVisualComplexity(VISUAL_COMPLEXITY_UNKNOWN),
 	mTurning(FALSE),
 	mLastSkeletonSerialNum( 0 ),
@@ -8283,6 +8283,16 @@ void LLVOAvatar::idleUpdateRenderComplexity()
 	}
 }
 
+void LLVOAvatar::modifyAttachmentGeometryBytes(S32 delta)
+{
+    mAttachmentGeometryBytes = llmax(mAttachmentGeometryBytes + delta, 0);
+}
+
+void LLVOAvatar::modifyAttachmentSurfaceArea(F32 delta)
+{
+    F32 newval = mAttachmentSurfaceArea + delta;
+    mAttachmentSurfaceArea = ( newval > 0.0 ? newval : 0.0 );
+}
 
 void LLVOAvatar::updateVisualComplexity()
 {
diff --git a/indra/newview/llvoavatar.h b/indra/newview/llvoavatar.h
index a49aa730355861e52ff5fffbffad57da9a7b00ea..5f690be4c567dd31182aeeec80ee36e23fed50e1 100755
--- a/indra/newview/llvoavatar.h
+++ b/indra/newview/llvoavatar.h
@@ -253,15 +253,17 @@ class LLVOAvatar :
 	void			addNameTagLine(const std::string& line, const LLColor4& color, S32 style, const LLFontGL* font);
 	void 			idleUpdateRenderComplexity();
 	void			calculateUpdateRenderComplexity();
-	static const S32 VISUAL_COMPLEXITY_UNKNOWN;
+	static const U32 VISUAL_COMPLEXITY_UNKNOWN;
 	void			updateVisualComplexity();
 	
-	S32				getVisualComplexity()			{ return mVisualComplexity;				};		// Numbers calculated here by rendering AV
+	U32				getVisualComplexity()			{ return mVisualComplexity;				};		// Numbers calculated here by rendering AV
 	S32				getAttachmentGeometryBytes()	{ return mAttachmentGeometryBytes;		};		// number of bytes in attached geometry
+    void            modifyAttachmentGeometryBytes(S32 delta);
 	F32				getAttachmentSurfaceArea()		{ return mAttachmentSurfaceArea;		};		// estimated surface area of attachments
+    void            modifyAttachmentSurfaceArea(F32 delta);
 
-	S32				getReportedVisualComplexity()					{ return mReportedVisualComplexity;				};	// Numbers as reported by the SL server
-	void			setReportedVisualComplexity(S32 value)			{ mReportedVisualComplexity = value;			};
+	U32				getReportedVisualComplexity()					{ return mReportedVisualComplexity;				};	// Numbers as reported by the SL server
+	void			setReportedVisualComplexity(U32 value)			{ mReportedVisualComplexity = value;			};
 	
 	S32				getUpdatePeriod()				{ return mUpdatePeriod;			};
 	const LLColor4 &  getMutedAVColor()				{ return mMutedAVColor;			};
@@ -405,10 +407,10 @@ class LLVOAvatar :
 	static void	destroyGL();
 	static void	restoreGL();
 	S32			mSpecialRenderMode; // special lighting
+        
+  private:
 	S32			mAttachmentGeometryBytes; //number of bytes in attached geometry
 	F32			mAttachmentSurfaceArea; //estimated surface area of attachments
-
-private:
 	bool		shouldAlphaMask();
 
 	BOOL 		mNeedsSkin; // avatar has been animated and verts have not been updated
@@ -418,9 +420,9 @@ class LLVOAvatar :
 	S32  		mNumInitFaces; //number of faces generated when creating the avatar drawable, does not inculde splitted faces due to long vertex buffer.
 
 	// the isTooComplex method uses these mutable values to avoid recalculating too frequently
-	mutable S32  mVisualComplexity;
+	mutable U32  mVisualComplexity;
 	mutable bool mVisualComplexityStale;
-	S32          mReportedVisualComplexity; // from other viewers through the simulator
+	U32          mReportedVisualComplexity; // from other viewers through the simulator
 
 
 	VisualMuteSettings		mVisuallyMuteSetting;			// Always or never visually mute this AV
diff --git a/indra/newview/llvovolume.cpp b/indra/newview/llvovolume.cpp
index 0432f6f27c5da75e3fd317ae2b7e0aec9a1c2208..160e2fbdb357268f01cd06fcb0a7ea4861733954 100755
--- a/indra/newview/llvovolume.cpp
+++ b/indra/newview/llvovolume.cpp
@@ -4703,10 +4703,8 @@ void LLVolumeGeometryManager::rebuildGeom(LLSpatialGroup* group)
 
 	if (pAvatarVO)
 	{
-		pAvatarVO->mAttachmentGeometryBytes -= group->mGeometryBytes;
-		pAvatarVO->mAttachmentGeometryBytes = llmax(pAvatarVO->mAttachmentGeometryBytes, 0);
-		pAvatarVO->mAttachmentSurfaceArea -= group->mSurfaceArea;
-		pAvatarVO->mAttachmentSurfaceArea = llmax(pAvatarVO->mAttachmentSurfaceArea, 0.f);
+		pAvatarVO->modifyAttachmentGeometryBytes( -group->mGeometryBytes );
+		pAvatarVO->modifyAttachmentSurfaceArea( -group->mSurfaceArea );
 	}
 
 	group->mGeometryBytes = 0;
@@ -5260,24 +5258,10 @@ void LLVolumeGeometryManager::rebuildGeom(LLSpatialGroup* group)
 
 	if (pAvatarVO)
 	{
-		if (pAvatarVO->mAttachmentGeometryBytes < 0)
-		{	// First time through value is -1
-			pAvatarVO->mAttachmentGeometryBytes = group->mGeometryBytes;
-		}
-		else
-		{
-		pAvatarVO->mAttachmentGeometryBytes += group->mGeometryBytes;
-		}
-		if (pAvatarVO->mAttachmentSurfaceArea < 0.f)
-		{	// First time through value is -1
-			pAvatarVO->mAttachmentSurfaceArea = group->mSurfaceArea;
-		}
-		else
-		{
-		pAvatarVO->mAttachmentSurfaceArea += group->mSurfaceArea;
+        pAvatarVO->modifyAttachmentGeometryBytes( group->mGeometryBytes );
+		pAvatarVO->modifyAttachmentSurfaceArea( group->mSurfaceArea );
 	}
 }
-}
 
 static LLTrace::BlockTimerStatHandle FTM_REBUILD_MESH_FLUSH("Flush Mesh");