diff --git a/indra/newview/llfloaterimcontainer.cpp b/indra/newview/llfloaterimcontainer.cpp
index 51796b7486a7525758cca59aa4628a9e41031c7a..700bc94105d430ff316fc1bb8c7cfb000134ec6c 100644
--- a/indra/newview/llfloaterimcontainer.cpp
+++ b/indra/newview/llfloaterimcontainer.cpp
@@ -1212,7 +1212,7 @@ void LLFloaterIMContainer::doToSelectedGroup(const LLSD& userdata)
 
     if (action == "group_profile")
     {
-        LLGroupActions::show(mSelectedSession);
+    	LLGroupActions::show(mSelectedSession);
     }
     else if (action == "activate_group")
     {
@@ -2095,8 +2095,31 @@ void LLFloaterIMContainer::closeHostedFloater()
 	onClickCloseBtn();
 }
 
+void LLFloaterIMContainer::closeAllConversations()
+{
+	conversations_widgets_map::iterator widget_it = mConversationsWidgets.begin();
+	for (;widget_it != mConversationsWidgets.end(); ++widget_it)
+	{
+		if (widget_it->first != LLUUID())
+		{
+			LLConversationViewSession* widget = dynamic_cast<LLConversationViewSession*>(widget_it->second);
+			if (widget)
+			{
+				widget->destroyView();
+				mConversationsItems.erase(widget_it->first);
+				mConversationsWidgets.erase(widget_it->first);
+			}
+		}
+	}
+}
 void LLFloaterIMContainer::closeFloater(bool app_quitting/* = false*/)
 {
+	if(app_quitting)
+	{
+		gAgent.setDoNotDisturb(true);
+		closeAllConversations();
+	}
+
 	// Check for currently active session
 	LLUUID session_id = getSelectedSession();
 	// If current session is Nearby Chat or there is only one session remaining, close the floater
@@ -2110,6 +2133,11 @@ void LLFloaterIMContainer::closeFloater(bool app_quitting/* = false*/)
 	if (active_conversation)
 	{
 		active_conversation->closeFloater();
+		if(app_quitting)
+		{
+			LLFloater::closeFloater(app_quitting);
+		}
+
 	}
 }
 
diff --git a/indra/newview/llfloaterimcontainer.h b/indra/newview/llfloaterimcontainer.h
index 072a83d547239832b39964d1240a7539554d3c0b..5121e902cb1e4c1a6179b98d7c1d26b53d78cac5 100644
--- a/indra/newview/llfloaterimcontainer.h
+++ b/indra/newview/llfloaterimcontainer.h
@@ -118,8 +118,10 @@ public:
 	void assignResizeLimits();
 	virtual BOOL handleKeyHere(KEY key, MASK mask );
 	/*virtual*/ void closeFloater(bool app_quitting = false);
+    void closeAllConversations();
 	/*virtual*/ BOOL isFrontmost();
 
+
 private:
 	typedef std::map<LLUUID,LLFloater*> avatarID_panel_map_t;
 	avatarID_panel_map_t mSessions;