             self?.presentViewController(imagePicker, animated: true, completion: nil)
         }
         
-        proposeToAccess(.Photos, agreed: openCameraRoll, rejected: {
-            self.alertCanNotAccessCameraRoll()
+        proposeToAccess(.Photos, agreed: openCameraRoll, rejected: { [weak self] in
+            self?.alertCanNotAccessCameraRoll()
         })
     }
     

        openCameraButton.setTitleColor(UIColor.whiteColor(), forState: .Normal)
        openCameraButton.backgroundColor = UIColor.yepTintColor()
        openCameraButton.addTarget(self, action: #selector(RegisterPickAvatarViewController.openPhotoLibraryPicker), forControlEvents: .TouchUpInside)

    }
    
    // MARK: Helpers
    
    private func deviceWithMediaType(mediaType: String, preferringPosition position: AVCaptureDevicePosition) -> AVCaptureDevice? {
        let devices = AVCaptureDevice.devicesWithMediaType(mediaType)
        var captureDevice = devices.first as? AVCaptureDevice
        for device in devices as! [AVCaptureDevice] {
            if device.position == position {
                captureDevice = device
                break
            }
        }

        return captureDevice
    }

    // MARK: Actions

        }
    }

    override func viewDidLoad() {
        super.viewDidLoad()

