diff --git a/indra/newview/llviewerobjectlist.cpp b/indra/newview/llviewerobjectlist.cpp
index 82bc164021de1a2416097239c1ee83dc6b423f2b..81479e8b491dd823fd358954a3eebfc9f18e311a 100644
--- a/indra/newview/llviewerobjectlist.cpp
+++ b/indra/newview/llviewerobjectlist.cpp
@@ -884,13 +884,14 @@ void LLViewerObjectList::clearDebugText()
 void LLViewerObjectList::cleanupReferences(LLViewerObject *objectp)
 {
 	LLMemType mt(LLMemType::MTYPE_OBJECT);
-	if (mDeadObjects.count(objectp->mID))
+	if (mDeadObjects.find(objectp->mID) != mDeadObjects.end())
 	{
-		llinfos << "Object " << objectp->mID << " already on dead list, ignoring cleanup!" << llendl;	
-		return;
+		llinfos << "Object " << objectp->mID << " already on dead list!" << llendl;	
+	}
+	else
+	{
+		mDeadObjects.insert(objectp->mID);
 	}
-
-	mDeadObjects.insert(std::pair<LLUUID, LLPointer<LLViewerObject> >(objectp->mID, objectp));
 
 	// Cleanup any references we have to this object
 	// Remove from object map so noone can look it up.
@@ -1140,6 +1141,45 @@ bool LLViewerObjectList::hasMapObjectInRegion(LLViewerRegion* regionp)
 	return false ;
 }
 
+//make sure the region is cleaned up.
+void LLViewerObjectList::clearAllMapObjectsInRegion(LLViewerRegion* regionp) 
+{
+	std::set<LLViewerObject*> dead_object_list ;
+	std::set<LLViewerObject*> region_object_list ;
+	for (vobj_list_t::iterator iter = mMapObjects.begin(); iter != mMapObjects.end(); ++iter)
+	{
+		LLViewerObject* objectp = *iter;
+
+		if(objectp->isDead())
+		{
+			dead_object_list.insert(objectp) ;			
+		}
+		else if(objectp->getRegion() == regionp)
+		{
+			region_object_list.insert(objectp) ;
+		}
+	}
+
+	if(dead_object_list.size() > 0)
+	{
+		llwarns << "There are " << dead_object_list.size() << " dead objects on the map!" << llendl ;
+
+		for(std::set<LLViewerObject*>::iterator iter = dead_object_list.begin(); iter != dead_object_list.end(); ++iter)
+		{
+			cleanupReferences(*iter) ;
+		}
+	}
+	if(region_object_list.size() > 0)
+	{
+		llwarns << "There are " << region_object_list.size() << " objects not removed from the deleted region!" << llendl ;
+
+		for(std::set<LLViewerObject*>::iterator iter = region_object_list.begin(); iter != region_object_list.end(); ++iter)
+		{
+			(*iter)->markDead() ;
+		}
+	}
+}
+
 void LLViewerObjectList::renderObjectsForMap(LLNetMap &netmap)
 {
 	LLColor4 above_water_color = LLUIColorTable::instance().getColor( "NetMapOtherOwnAboveWater" );
@@ -1159,7 +1199,11 @@ void LLViewerObjectList::renderObjectsForMap(LLNetMap &netmap)
 	{
 		LLViewerObject* objectp = *iter;
 
-		llassert_always(!objectp->isDead());
+		//llassert_always(!objectp->isDead());
+		if(objectp->isDead())//some dead objects somehow not cleaned.
+		{
+			continue ;
+		}
 
 		if (!objectp->getRegion() || objectp->isOrphaned() || objectp->isAttachment())
 		{
diff --git a/indra/newview/llviewerobjectlist.h b/indra/newview/llviewerobjectlist.h
index 8cff8e988aa455eba3ed18ccdeae58874f04af2d..22a7f97c38e5474aad34ef01e28654efa6b8340a 100644
--- a/indra/newview/llviewerobjectlist.h
+++ b/indra/newview/llviewerobjectlist.h
@@ -88,6 +88,7 @@ class LLViewerObjectList
 	void shiftObjects(const LLVector3 &offset);
 
 	bool hasMapObjectInRegion(LLViewerRegion* regionp) ;
+	void clearAllMapObjectsInRegion(LLViewerRegion* regionp) ;
 	void renderObjectsForMap(LLNetMap &netmap);
 	void renderObjectBounds(const LLVector3 &center);
 
@@ -181,8 +182,7 @@ class LLViewerObjectList
 
 	vobj_list_t mMapObjects;
 
-	typedef std::map<LLUUID, LLPointer<LLViewerObject> > vo_map;
-	vo_map mDeadObjects;	// Need to keep multiple entries per UUID
+	std::set<LLUUID> mDeadObjects;	
 
 	std::map<LLUUID, LLPointer<LLViewerObject> > mUUIDObjectMap;
 
diff --git a/indra/newview/llworld.cpp b/indra/newview/llworld.cpp
index 481148ba4e5f9ea7d07217f89bf5f3e020a464e1..8f7197c60758e5d95aa65ccfeb0e51c7d08ad75e 100644
--- a/indra/newview/llworld.cpp
+++ b/indra/newview/llworld.cpp
@@ -282,7 +282,9 @@ void LLWorld::removeRegion(const LLHost &host)
 
 	updateWaterObjects();
 
-	llassert_always(!gObjectList.hasMapObjectInRegion(regionp)) ;
+	//double check all objects of this region are removed.
+	gObjectList.clearAllMapObjectsInRegion(regionp) ;
+	//llassert_always(!gObjectList.hasMapObjectInRegion(regionp)) ;
 }