diff --git a/apps/files_sharing/ajax/unshare.php b/apps/files_sharing/ajax/unshare.php
index 78d7d2e25f09b289d814acd424ec6031dad323b6..b9230d257b767d9c32f01cb8446f9b34fedc082b 100644
--- a/apps/files_sharing/ajax/unshare.php
+++ b/apps/files_sharing/ajax/unshare.php
@@ -4,7 +4,7 @@ $RUNTIME_NOAPPS = true;
 require_once('../../../lib/base.php');
 require_once('../lib_share.php');
 
-$source = $_GET['source'];
+$source = "/".OC_User::getUser()."/files".$_GET['source'];
 $uid_shared_with = $_GET['uid_shared_with'];
 OC_Share::unshare($source, $uid_shared_with);
 
diff --git a/apps/files_sharing/js/share.js b/apps/files_sharing/js/share.js
index ce3e1193bc2ecf895cf61919ee70a94b3747a7cf..7931f00fb68de85779b6288f0d15039897696e02 100644
--- a/apps/files_sharing/js/share.js
+++ b/apps/files_sharing/js/share.js
@@ -33,7 +33,7 @@ $(document).ready(function() {
 		if (!($(event.target).hasClass('drop')) && $(event.target).parents().index($('#dropdown')) == -1) {
 			if ($('#dropdown').is(':visible')) {
 				$('#dropdown').hide('blind', function() {
-					$('#dropdown').remove();
+					$('#dropdown').remove();S
 					$('tr').removeClass('mouseOver');
 				});
 			}
@@ -51,7 +51,7 @@ $(document).ready(function() {
 			cache: false,
 			data: data,
 			success: function() {
-				addUser(uid_shared_with, 0, false);
+				addUser(uid_shared_with, permissions, false);
 			}
 		});
 	});
@@ -80,13 +80,12 @@ $(document).ready(function() {
 			data: data
 		});
 	});
-	
+
 	$('.unshare').live('click', function(event) {
-		// TODO Fix unshare
 		event.preventDefault();
-		event.stopPropagation();
+		var user = $(this).parent();
 		var source = $('#dropdown').data('file');
-		var uid_shared_with = $(this).parent().data('uid_shared_with');
+		var uid_shared_with = user.data('uid_shared_with');
 		var data = 'source='+encodeURIComponent(source)+'&uid_shared_with='+encodeURIComponent(uid_shared_with);
 		$.ajax({
 			type: 'GET',
@@ -94,7 +93,10 @@ $(document).ready(function() {
 			cache: false,
 			data: data,
 			success: function() {
-				$(this).parent().remove();
+				var option = "<option value='"+uid_shared_with+"'>"+uid_shared_with+"</option>";
+				$(user).remove();
+				$(option).appendTo('#share_with');
+				$('#share_with').trigger('liszt:updated');
 			}
 		});
 	});
diff --git a/files/js/files.js b/files/js/files.js
index 519d48a523dfefb9ecf9cc985af4703d931714a5..bc040b54d5723b85b42974366c57301d3ac0f9bb 100644
--- a/files/js/files.js
+++ b/files/js/files.js
@@ -21,7 +21,7 @@ $(document).ready(function() {
 	});
 
 	// Sets the file link behaviour :
-	$('td.filename a').live('click',function(event) {
+	$('td.filename.name a').live('click',function(event) {
 		event.preventDefault();
 		var filename=$(this).parent().parent().data('file');
 		if(!FileList.isLoading(filename)){