diff --git a/sflphone-common/src/audio/audiortp/AudioRtpFactory.cpp b/sflphone-common/src/audio/audiortp/AudioRtpFactory.cpp
index ab02df4eccd1c7906f6bd93c8601f3dc074fc2cf..84d44d91ea93fe6ce65ed0fdacd5569ecd928507 100644
--- a/sflphone-common/src/audio/audiortp/AudioRtpFactory.cpp
+++ b/sflphone-common/src/audio/audiortp/AudioRtpFactory.cpp
@@ -203,7 +203,7 @@ void AudioRtpFactory::stop (void)
                 break;
 
             case Symmetric:
-                static_cast<AudioSrtpSession *> (_rtpSession)->stopRtpThread();
+                static_cast<AudioRtpSession *> (_rtpSession)->stopRtpThread();
                 break;
 
             case Zrtp:
diff --git a/sflphone-common/src/audio/audiortp/AudioRtpSession.cpp b/sflphone-common/src/audio/audiortp/AudioRtpSession.cpp
index a61a6165eeb64a8adb9dcd0ec2aafd251fdec39f..954e406c7e1a4075261e1eccd6efdbd50e569a0e 100644
--- a/sflphone-common/src/audio/audiortp/AudioRtpSession.cpp
+++ b/sflphone-common/src/audio/audiortp/AudioRtpSession.cpp
@@ -81,13 +81,15 @@ AudioRtpSession::~AudioRtpSession()
         _debugException ("AudioRtpSession: Thread destructor didn't terminate correctly");
         throw;
     }
-
-    Manager::instance().getMainBuffer()->unBindAll (_audioRtpRecord._callId);
 }
 
 void AudioRtpSession::final()
 {
-    delete this;
+    _debug ("AudioRtpSession: Finalize AudioRtpSession instance");
+
+    Manager::instance().getMainBuffer()->unBindAll (_audioRtpRecord._callId);
+
+    delete static_cast<AudioRtpSession *> (this);
 }
 
 void AudioRtpSession::setSessionTimeouts (void)
@@ -403,8 +405,6 @@ void AudioRtpSession::run ()
 
     _debug ("AudioRtpSession: Left main loop for call %s", _audioRtpRecord._callId.c_str());
 
-    Thread::exit();
-
 }
 
 }
diff --git a/sflphone-common/src/audio/audiortp/AudioRtpSession.h b/sflphone-common/src/audio/audiortp/AudioRtpSession.h
index 6e495d29f8e42c782b053f151c2e1fdd71ee3988..7461d7027b3ca15be3f1ec733f8e6d76e0624dce 100644
--- a/sflphone-common/src/audio/audiortp/AudioRtpSession.h
+++ b/sflphone-common/src/audio/audiortp/AudioRtpSession.h
@@ -71,6 +71,8 @@ class AudioRtpSession : protected ost::Thread, public ost::TimerPort, public Aud
 
         virtual void final ();
 
+        void terminateRtpSession();
+
         // Thread associated method
         virtual void run ();
 
@@ -137,7 +139,7 @@ class AudioRtpSession : protected ost::Thread, public ost::TimerPort, public Aud
         // optional in ost::thread, then
         // it amounts to the same as doing
         // start() with no semaphore at all.
-        ost::Semaphore * _mainloopSemaphore;
+        ost::Semaphore *_mainloopSemaphore;
 
         // Main destination address for this rtp session.
         // Stored in case or reINVITE, which may require to forget
diff --git a/sflphone-common/src/audio/pulseaudio/pulselayer.cpp b/sflphone-common/src/audio/pulseaudio/pulselayer.cpp
index c360756ee205a6738b944af5c859a2f3a3b56502..6aa3b226e1fe241a05b651fde075ce2e57b92c39 100644
--- a/sflphone-common/src/audio/pulseaudio/pulselayer.cpp
+++ b/sflphone-common/src/audio/pulseaudio/pulselayer.cpp
@@ -249,10 +249,6 @@ PulseLayer::PulseLayer (ManagerImpl* manager)
 
     byteCounter = 0;
 
-
-    // captureFile = new ofstream ("probeCaptureFile", ofstream::binary);
-    // spkrFile = new ofstream ("probeSpkrFile", ofstream::binary);
-
     openLayer();
 }
 
@@ -271,13 +267,6 @@ PulseLayer::~PulseLayer (void)
 
     delete AudioLayer::_audiofilter;
     AudioLayer::_audiofilter = NULL;
-
-
-    // captureFile->close();
-    // spkrFile->close();
-
-    // delete captureFile;
-    // delete spkrFile;
 }
 
 void
diff --git a/sflphone-common/src/global.h b/sflphone-common/src/global.h
index f69f1898ac30d4514b826a12909e953983400bce..d69aea955e31fb8871a6dca623f53cb9a6c0fc9f 100644
--- a/sflphone-common/src/global.h
+++ b/sflphone-common/src/global.h
@@ -44,7 +44,7 @@
 #include <vector>
 #include "logger.h"
 
-#define SFLPHONED_VERSION "0.9.8"		/** Version number */
+#define SFLPHONED_VERSION "0.9.12"		/** Version number */
 
 #define HOMEDIR					(getenv ("HOME"))				/** Home directory */
 #define XDG_DATA_HOME			(getenv ("XDG_DATA_HOME"))
diff --git a/sflphone-common/src/sip/sipcall.cpp b/sflphone-common/src/sip/sipcall.cpp
index 8e88ee7edd93d398a37794bc32f908ca1d914b99..17476ad1e435d8da48a5287765e6abb709774666 100644
--- a/sflphone-common/src/sip/sipcall.cpp
+++ b/sflphone-common/src/sip/sipcall.cpp
@@ -65,8 +65,8 @@ SIPCall::~SIPCall()
     delete _local_sdp;
     _local_sdp = NULL;
 
-    _error ("SDP: pool capacity %d", pj_pool_get_capacity (_pool));
-    _error ("SDP: pool size %d", pj_pool_get_used_size (_pool));
+    _debug ("SDP: pool capacity %d", pj_pool_get_capacity (_pool));
+    _debug ("SDP: pool size %d", pj_pool_get_used_size (_pool));
 
     // Release memory allocated for SDP only once
     pj_pool_release (_pool);
diff --git a/sflphone-common/src/sip/sipvoiplink.cpp b/sflphone-common/src/sip/sipvoiplink.cpp
index b727efac3392c28557f19a309ef73e1efdc8e91e..31aac9ac76c4d2f661e92d8059cc3668564608c9 100644
--- a/sflphone-common/src/sip/sipvoiplink.cpp
+++ b/sflphone-common/src/sip/sipvoiplink.cpp
@@ -473,7 +473,6 @@ int SIPVoIPLink::sendRegister (AccountID id)
     int expire_value;
 
     pj_status_t status;
-    pj_str_t useragent;
     pjsip_tx_data *tdata;
     pjsip_host_info destination;
 
@@ -636,7 +635,9 @@ int SIPVoIPLink::sendRegister (AccountID id)
     // Add User-Agent Header
     pj_list_init (&hdr_list);
 
-    useragent = pj_str ( (char*) get_useragent_name (id).c_str());
+    const char *useragent_name = get_useragent_name (id).c_str();
+    pj_str_t useragent = pj_str ( (char *) useragent_name);
+    // pj_str_t useragent = pj_str ( (char *) "SFLphone"); // { (char *) "SFLphone",  8};
 
     h = pjsip_generic_string_hdr_create (_pool, &STR_USER_AGENT, &useragent);
 
@@ -771,8 +772,8 @@ SIPVoIPLink::newOutgoingCall (const CallID& id, const std::string& toUrl) throw
 
     _debug ("UserAgent: New outgoing call %s to %s", id.c_str(), toUrl.c_str());
 
-    _error ("UserAgent: pool capacity %d", pj_pool_get_capacity (_pool));
-    _error ("UserAgent: pool size %d", pj_pool_get_used_size (_pool));
+    _debug ("UserAgent: pool capacity %d", pj_pool_get_capacity (_pool));
+    _debug ("UserAgent: pool size %d", pj_pool_get_used_size (_pool));
 
     SIPCall* call = new SIPCall (id, Call::Outgoing, _cp);
 
@@ -864,8 +865,8 @@ SIPVoIPLink::answer (const CallID& id)
 
     SIPCall *call = getSIPCall (id);
 
-    _error ("UserAgent: pool capacity %d", pj_pool_get_capacity (_pool));
-    _error ("UserAgent: pool size %d", pj_pool_get_used_size (_pool));
+    _debug ("UserAgent: pool capacity %d", pj_pool_get_capacity (_pool));
+    _debug ("UserAgent: pool size %d", pj_pool_get_used_size (_pool));
 
 
     if (call==0) {