diff --git a/console/commands.c b/console/commands.c
index c3e1e472fda1668ea148ceebc522847aa5e8585f..9efc054e7f5bb1a0ffdcfc4d1772043e2e7fb7aa 100644
--- a/console/commands.c
+++ b/console/commands.c
@@ -1245,15 +1245,11 @@ static int lpc_cmd_resume(LinphoneCore *lc, char *args){
 		if (n == 1){
 			LinphoneCall *call=linphonec_get_call (id);
 			if (call){
-				if(linphone_core_resume_call(lc,call)==-1)
-				{
+				if(linphone_core_resume_call(lc,call)==-1){
 					linphonec_out("There was a problem to resume the call check the remote address you gave %s\n",args);
-					return 1;
 				}
-			}else
-			{
-				return 1;
 			}
+			return 1;
 		}else return 0;
 	}
 	else
diff --git a/coreapi/linphonecore.c b/coreapi/linphonecore.c
index 38f69d23d5e016511f03993bd571295e7ffdfefa..82d77c6ab1b30ddeaee19b56ecb6de5c79ae5afa 100644
--- a/coreapi/linphonecore.c
+++ b/coreapi/linphonecore.c
@@ -2031,11 +2031,11 @@ LinphoneCall * linphone_core_invite_address(LinphoneCore *lc, const LinphoneAddr
 	}
 	/* this call becomes now the current one*/
 	lc->current_call=call;
+	linphone_call_set_state (call,LinphoneCallOutgoingInit,"Starting outgoing call");
 	if (dest_proxy!=NULL || lc->sip_conf.ping_with_options==FALSE){
 		err=linphone_core_start_invite(lc,call,dest_proxy);
 	}else{
 		/*defer the start of the call after the OPTIONS ping*/
-		linphone_call_set_state (call,LinphoneCallOutgoingInit,"Starting outgoing call");
 		call->ping_op=sal_op_new(lc->sal);
 		sal_ping(call->ping_op,from,real_url);
 		sal_op_set_user_pointer(call->ping_op,call);