         if isSharing {
             let selectedPhoto = photos[indexPath.row]
             selectedPhotos.removeAtIndex(selectedPhotos.indexOf(selectedPhoto)!)
-            updateBarTitle()
+            updateShareSelection()
         }
     }
     

            self.shareBarButton?.title = NSLocalizedString(editState ? "SharePhotos"  : "SelectPhotos", comment: "")
        }
        
        updateBarTitle()
    }
    
    func updateBarTitle() {
        var barTitle = NSLocalizedString(isSharing ? "PickPhotos"  : "DisplayPhotos", comment: "")
        let photoCount = selectedPhotos.count
        if photoCount > 0 {
            barTitle += " (" + String(photoCount) + ")"
        }
        
        navigationItem.title = barTitle
    }

    override func collectionView(collectionView: UICollectionView, didSelectItemAtIndexPath indexPath: NSIndexPath) {
        if isSharing {
            selectedPhotos.append(photos[indexPath.row])
            updateShareSelection()
        }
        else {
            collectionView.deselectItemAtIndexPath(indexPath, animated: true)
