diff --git a/apps/files_sharing/js/share.js b/apps/files_sharing/js/share.js
index 1b04097ccb1750816755d0a30eaccdacf6f11191..e9889babaaa6a9b9df9a37e3312fad3d3fabbea5 100644
--- a/apps/files_sharing/js/share.js
+++ b/apps/files_sharing/js/share.js
@@ -31,8 +31,8 @@ $(document).ready(function() {
 			// we create a share notification action to inform the user about files
 			// shared with him otherwise we just update the existing share action.
 			var allShared;
+			var $fileList = $(this);
 			if (oc_appconfig.core.sharingDisabledForUser) {
-				var $fileList = $(this);
 				allShared = $fileList.find('[data-share-owner]');
 				var shareNotification = '<a class="action action-share-notification permanent"' +
 						' data-action="Share-Notification" href="#" original-title="">' +
@@ -40,8 +40,13 @@ $(document).ready(function() {
 				$(allShared).find('.fileactions').append(function() {
 					var owner = $(this).closest('tr').attr('data-share-owner');
 					var shareBy = t('files_sharing', 'Shared by {owner}', {owner: owner});
-					return shareNotification + '<span> ' + shareBy + '</span></span>';
+					var $result = $(shareNotification + '<span> ' + shareBy + '</span></span>');
+					$result.on('click', function() {
+						return false;
+					});
+					return $result;
 				});
+
 			} else {
 				allShared = $fileList.find('[data-share-owner] [data-Action="Share"]');
 				allShared.addClass('permanent');
diff --git a/apps/files_sharing/lib/sharedstorage.php b/apps/files_sharing/lib/sharedstorage.php
index 07a0acf00a5257b078bfa5d435252602b48fb3ce..02a8ebab93ac2dca995879c9c1ecd0a4f1ed2238 100644
--- a/apps/files_sharing/lib/sharedstorage.php
+++ b/apps/files_sharing/lib/sharedstorage.php
@@ -517,14 +517,14 @@ class Shared extends \OC\Files\Storage\Common {
 			$parent = dirname($parent);
 		}
 
-		$newMountPoint = \OC\Files\Filesystem::normalizePath($parent . '/' . $mountPoint);
+		$newMountPoint = \OCA\Files_Sharing\Helper::generateUniqueTarget(
+				\OC\Files\Filesystem::normalizePath($parent . '/' . $mountPoint),
+				array(),
+				new \OC\Files\View('/' . \OCP\User::getUser() . '/files')
+				);
 
 		if($newMountPoint !== $share['file_target']) {
-			$newMountPoint = \OCA\Files_Sharing\Helper::generateUniqueTarget(
-					$newMountPoint,
-					array(),
-					new \OC\Files\View('/' . \OCP\User::getUser() . '/files')
-					);
+
 			self::updateFileTarget($newMountPoint, $share);
 			$share['file_target'] = $newMountPoint;