diff --git a/indra/newview/llfloaterimcontainer.cpp b/indra/newview/llfloaterimcontainer.cpp
index 304fb78260900c09f41490455b6cff004ef2486b..d4b552deae18465392df16ddb99542634e38269e 100644
--- a/indra/newview/llfloaterimcontainer.cpp
+++ b/indra/newview/llfloaterimcontainer.cpp
@@ -1353,10 +1353,12 @@ bool LLFloaterIMContainer::removeConversationListItem(const LLUUID& uuid, bool c
 		setFocus(TRUE);
 		if(new_selection != NULL)
 		{
+			if (mConversationsWidgets.size() == 1)
+				new_selection = new_selection->getParentFolder();
 			LLConversationItem* vmi = dynamic_cast<LLConversationItem*>(new_selection->getViewModelItem());
 			if(vmi != NULL)
 			{
-				selectConversation(vmi->getUUID());
+				selectConversationPair(vmi->getUUID(), true);
 			}
 		}
 	}