         // YPImagePickerConfiguration.shared.wordings.libraryTitle = "Gallery2"
 
         /* Multiple media implementation */
-        picker.didFinishPicking { [unowned picker] items, cancelled in
+        picker.didFinishPicking { [weak picker] items, cancelled in
 
             if cancelled {
                 print("Picker was canceled")
-                picker.dismiss(animated: true, completion: nil)
+                picker?.dismiss(animated: true, completion: nil)
                 return
             }
             _ = items.map { print("🧀 \($0)") }

        }

        /* Single Photo implementation. */
        // picker.didFinishPicking { [unowned picker] items, _ in
        //     self.selectedItems = items
        //     self.selectedImageV.image = items.singlePhoto?.image
        //     picker.dismiss(animated: true, completion: nil)
        // }

        /* Single Video implementation. */
        //picker.didFinishPicking { [unowned picker] items, cancelled in
        //    if cancelled { picker.dismiss(animated: true, completion: nil); return }
        //
        //    self.selectedItems = items

                switch firstItem {
                case .photo(let photo):
                    self.selectedImageV.image = photo.image
                    picker?.dismiss(animated: true, completion: nil)
                case .video(let video):
                    self.selectedImageV.image = video.thumbnail

