diff --git a/chatdialog.cpp b/chatdialog.cpp
index 031189e..291d2a0 100644
--- a/chatdialog.cpp
+++ b/chatdialog.cpp
@@ -382,7 +382,7 @@
   QSettings s(ORGANIZATION, APPLICATION);
   QString nick = s.value("nick", "").toString();
   QString chatroom = s.value("chatroom", "").toString();
-  QString prefix = s.value("prefix", "").toString();
+  QString originPrefix = s.value("originPrefix", "").toString();
   if (nick == "" || chatroom == "" || prefix == "") {
     QTimer::singleShot(500, this, SLOT(buttonPressed()));
     return false;
@@ -390,7 +390,8 @@
   else {
     m_user.setNick(nick);
     m_user.setChatroom(chatroom);
-    m_user.setPrefix(prefix);
+    m_user.setOriginPrefix(originPrefix);
+    m_user.setPrefix(origin_prefix + "/" + chatroom + "/" + getRandomString());
     return true;
   }
 #else
@@ -406,7 +407,7 @@
   QSettings s(ORGANIZATION, APPLICATION);
   s.setValue("nick", m_user.getNick());
   s.setValue("chatroom", m_user.getChatroom());
-  s.setValue("prefix", m_user.getPrefix());
+  s.setValue("originPrefix", m_user.getOriginPrefix());
 #endif
 }
 
@@ -416,8 +417,8 @@
   QString settingDisp = QString("Chatroom: %1").arg(m_user.getChatroom());
   infoLabel->setStyleSheet("QLabel {color: #630; font-size: 16px; font: bold \"Verdana\";}");
   infoLabel->setText(settingDisp);
-  //QString prefixDisp = QString("<Prefix: %1>").arg(m_user.getPrefix());
-  //prefixLabel->setText(prefixDisp);
+  QString prefixDisp = QString("<Prefix: %1>").arg(m_user.getPrefix());
+  prefixLabel->setText(prefixDisp);
 }
 
 void 
@@ -490,7 +491,7 @@
 void
 ChatDialog::buttonPressed()
 {
-  SettingDialog dialog(this, m_user.getNick(), m_user.getChatroom(), m_user.getPrefix());
+  SettingDialog dialog(this, m_user.getNick(), m_user.getChatroom(), m_user.getOriginPrefix());
   connect(&dialog, SIGNAL(updated(QString, QString, QString)), this, SLOT(settingUpdated(QString, QString, QString)));
   dialog.exec();
   QTimer::singleShot(100, this, SLOT(checkSetting()));
@@ -499,28 +500,37 @@
 void
 ChatDialog::checkSetting()
 {
-  if (m_user.getPrefix().isEmpty() || m_user.getNick().isEmpty() || m_user.getChatroom().isEmpty())
+  if (m_user.getOriginPrefix().isEmpty() || m_user.getNick().isEmpty() || m_user.getChatroom().isEmpty())
   {
     buttonPressed();
   }
 }
 
 void
-ChatDialog::settingUpdated(QString nick, QString chatroom, QString prefix)
+ChatDialog::settingUpdated(QString nick, QString chatroom, QString originPrefix)
 {
+  QString randString = getRandomString();
   bool needWrite = false;
+  bool needFresh = false;
   if (!nick.isEmpty() && nick != m_user.getNick()) {
     m_user.setNick(nick);
     needWrite = true;
   }
-  if (!prefix.isEmpty() && prefix != m_user.getPrefix()) {
-    m_user.setPrefix(prefix + "/" + getRandomString());
+  if (!originPrefix.isEmpty() && originPrefix != m_user.getOriginPrefix()) {
+    m_user.setOriginPrefix(originPrefix);
+    m_user.setPrefix(originPrefix + "/" + m_user.getChatroom() + "/" + randString);
     needWrite = true;
-    // TODO: set the previous prefix as left?
+    needFresh = true;
   }
   if (!chatroom.isEmpty() && chatroom != m_user.getChatroom()) {
     m_user.setChatroom(chatroom);
+    m_user.setPrefix(m_user.getOriginPrefix() + "/" + chatroom + "/" + randString);
     needWrite = true;
+    needFresh = true;
+  }
+
+  if (needFresh)
+  {
 
     {
       boost::recursive_mutex::scoped_lock lock(m_sceneMutex);
@@ -555,6 +565,7 @@
     fitView();
     
   }
+
   if (needWrite) {
     writeSettings();
     updateLabels();
diff --git a/chatdialog.ui b/chatdialog.ui
index be648e1..e36ed32 100644
--- a/chatdialog.ui
+++ b/chatdialog.ui
@@ -41,7 +41,6 @@
                 </property>
                 </widget>
               </item>
-              <!--
               <item>
                 <widget class="QLabel" name="prefixLabel">
                 <property name="focusPolicy">
@@ -49,7 +48,6 @@
                 </property>
                 </widget>
               </item>
-              -->
             </layout>
           </item>
           <item>
diff --git a/digesttreescene.h b/digesttreescene.h
index 7d30bac..0e2e0f7 100644
--- a/digesttreescene.h
+++ b/digesttreescene.h
@@ -65,15 +65,18 @@
   void setChatroom(QString chatroom) {m_chatroom = chatroom;}
   void setSeq(Sync::SeqNo seq) {m_seq = seq;}
   void setReceived(time_t t) {m_received = t;}
+  void setOriginPrefix(QString originPrefix) { m_originPrefix = originPrefix;}
   QString getNick() { return m_nick;}
   QString getPrefix() { return m_prefix;}
   QString getChatroom() { return m_chatroom;}
+  QString getOriginPrefix() { return m_originPrefix;}
   Sync::SeqNo getSeqNo() { return m_seq;}
   time_t getReceived() { return m_received;}
 private:
   QString m_nick;
   QString m_prefix;
   QString m_chatroom;
+  QString m_originPrefix;
   Sync::SeqNo m_seq;
   time_t m_received;
 };
