diff --git a/apps/contacts/ajax/addcard.php b/apps/contacts/ajax/addcard.php
index 70e0f0a89d0940c5111c7d6b6589691b1ee1baf4..ee95513732de9277f98243221d6c544048eac73b 100644
--- a/apps/contacts/ajax/addcard.php
+++ b/apps/contacts/ajax/addcard.php
@@ -44,10 +44,9 @@ $vcard->add(new Sabre_VObject_Property('UID',OC_Contacts_VCard::createUID()));
 $id = OC_Contacts_VCard::add($aid,$vcard->serialize());
 
 $details = OC_Contacts_VCard::structureContact($vcard);
-$name = $details['FN'][0]['value'];
 $tmpl = new OC_Template('contacts','part.details');
 $tmpl->assign('details',$details);
 $tmpl->assign('id',$id);
 $page = $tmpl->fetchPage();
 
-OC_JSON::success(array('data' => array( 'id' => $id, 'name' => $name, 'page' => $page )));
+OC_JSON::success(array('data' => array( 'id' => $id, 'page' => $page )));
diff --git a/apps/contacts/js/interface.js b/apps/contacts/js/interface.js
index 3ec84a3c8bac7df673219bfb89b3e712c973208a..47e9bb10b1f4f3218dbcc1f371df4a6647b43066 100644
--- a/apps/contacts/js/interface.js
+++ b/apps/contacts/js/interface.js
@@ -104,6 +104,8 @@ $(document).ready(function(){
 			if(jsondata.status == 'success'){
 				$('#rightcontent').data('id',jsondata.data.id);
 				$('#rightcontent').html(jsondata.data.page);
+				$('#leftcontent .active').removeClass('active');
+				$('#leftcontent ul').append('<li data-id="'+jsondata.data.id+'" class="active"><a href="index.php?id='+jsondata.data.id+'">'+jsondata.data.name+'</a></li>');
 			}
 			else{
 				alert(jsondata.data.message);
diff --git a/apps/contacts/lib/vcard.php b/apps/contacts/lib/vcard.php
index 78327ab15e1ae089ec3155522e6475143b08bf1f..bff2897384fd14ce6ca002877560666e4212b743 100644
--- a/apps/contacts/lib/vcard.php
+++ b/apps/contacts/lib/vcard.php
@@ -246,7 +246,7 @@ class OC_Contacts_VCard{
 	public static function escapeSemicolons($value){
 		foreach($value as &$i ){
 			$i = implode("\\\\;", explode(';', $i));
-		} unset($i);
+		}
 		return implode(';',$value);
 	}