diff --git a/sflphone-common/src/audio/pulseaudio/pulselayer.cpp b/sflphone-common/src/audio/pulseaudio/pulselayer.cpp
index 521d4d72e32f00ed005b6cfef9d291d79cd74249..094ac14df50ea841b756d9e825a0d4a36cd1cc8b 100644
--- a/sflphone-common/src/audio/pulseaudio/pulselayer.cpp
+++ b/sflphone-common/src/audio/pulseaudio/pulselayer.cpp
@@ -361,7 +361,7 @@ void PulseLayer::writeToSpeaker (void)
         toGet = (urgentAvail < (int) (framesPerBuffer * sizeof (SFLDataFormat))) ? urgentAvail : framesPerBuffer * sizeof (SFLDataFormat);
         out = (SFLDataFormat*) pa_xmalloc (toGet * sizeof (SFLDataFormat));
         _urgentRingBuffer.Get (out, toGet, 100);
-        pa_stream_write (playback->pulseStream() , out , toGet  , pa_xfree, 0 , PA_SEEK_RELATIVE);
+        pa_stream_write (playback->pulseStream(), out, toGet, NULL, 0, PA_SEEK_RELATIVE);
         // Consume the regular one as well (same amount of bytes)
         _mainBuffer.discard (toGet);
 
@@ -376,7 +376,7 @@ void PulseLayer::writeToSpeaker (void)
             toGet = framesPerBuffer;
             out = (SFLDataFormat*) pa_xmalloc (toGet * sizeof (SFLDataFormat));
             tone->getNext (out, toGet , 100);
-            pa_stream_write (playback->pulseStream() , out , toGet  * sizeof (SFLDataFormat)   , pa_xfree, 0 , PA_SEEK_RELATIVE);
+            pa_stream_write (playback->pulseStream(), out, toGet  * sizeof (SFLDataFormat), NULL, 0, PA_SEEK_RELATIVE);
 
 	    pa_xfree (out);
         }
@@ -387,7 +387,7 @@ void PulseLayer::writeToSpeaker (void)
             toPlay = ( (int) (toGet * sizeof (SFLDataFormat)) > framesPerBuffer) ? framesPerBuffer : toGet * sizeof (SFLDataFormat) ;
             out = (SFLDataFormat*) pa_xmalloc (toPlay);
             tone->getNext (out, toPlay/2 , 100);
-            pa_stream_write (playback->pulseStream() , out , toPlay   , pa_xfree, 0 , PA_SEEK_RELATIVE) ;
+            pa_stream_write (playback->pulseStream(), out, toPlay, NULL, 0, PA_SEEK_RELATIVE);
 
 	    pa_xfree (out);
 
@@ -400,7 +400,7 @@ void PulseLayer::writeToSpeaker (void)
             if (toGet) {
 
                 _mainBuffer.getData (out, toGet, 100);
-		pa_stream_write (playback->pulseStream() , out , toGet  , NULL, 0 , PA_SEEK_RELATIVE);
+		pa_stream_write (playback->pulseStream(), out, toGet, NULL, 0, PA_SEEK_RELATIVE);
 		_urgentRingBuffer.Discard (toGet);
             } else {
 
@@ -409,6 +409,8 @@ void PulseLayer::writeToSpeaker (void)
 
             pa_xfree (out);
         }
+
+	_urgentRingBuffer.Discard(toGet);
     }
 
 }
diff --git a/sflphone-common/src/managerimpl.cpp b/sflphone-common/src/managerimpl.cpp
index f01b3753e8b718c0676bc715904de4e3e9f10877..d2fc50d23dd2c00616f027ca4e93f888ee37a9d1 100644
--- a/sflphone-common/src/managerimpl.cpp
+++ b/sflphone-common/src/managerimpl.cpp
@@ -347,7 +347,7 @@ ManagerImpl::answerCall (const CallID& call_id)
 
     AccountID account_id = getAccountFromCall (call_id);
     if(account_id == AccountNULL) {
-        _debug("ManagerImpl::answerCall : AccountId is null\n");
+        _debug("    answerCall : AccountId is null\n");
     }
     
     Call* call = NULL;
@@ -355,29 +355,6 @@ ManagerImpl::answerCall (const CallID& call_id)
     if (call == NULL) {
         _debug("    answerCall: currentCall is null\n");
     }
-    /*
-    Call* lastCall = NULL;
-    if (!getCurrentCallId().empty()) {
-        lastCall = getAccountLink (currentAccountId)->getCall (getCurrentCallId());
-        if (lastCall == NULL) {
-            _debug("ManagerImpl::answerCall : lastCall is null\n");
-        }
-    }
-
-    _debug ("ManagerImpl::answerCall :: current call->getState %i \n", currentCall->getState());
-    _debug ("Try to answer call: %s\n", id.data());
-
-    if (lastCall != NULL ) {
-        if (lastCall->getState() == Call::Active && !participToConference(getCurrentCallId())) {
-            _debug ("* Manager Info: there is currently a call, try to hold it\n");
-            onHoldCall (getCurrentCallId());
-        }
-	else if (isConference(getCurrentCallId()))
-	{
-	    _debug("Current call particips to a conference! Do not hold it!\n");
-	}
-    }
-    */
 
     // in any cases we have to detach from current communication
     if (hasCurrentCall()) {