             selectedPhoto = info[UIImagePickerControllerOriginalImage] as! UIImage
         }
 		self.handler?(SRKCameraResponse.success(selectedPhoto))
-        self.dismiss(animated: false, completion: nil)
+		picker.dismiss(animated: false) {
+			self.dismiss(animated: false, completion: nil)
+		}
     }
 	
-	public func imagePickerControllerDidCancel(_ picker: UIImagePickerController) {
+	func imagePickerControllerDidCancel(_ picker: UIImagePickerController) {
 		self.handler?(SRKCameraResponse.cancelled)
-		self.dismiss(animated: false, completion: nil)
+		picker.dismiss(animated: false) {
+			self.dismiss(animated: false, completion: nil)
+		}
 	}
 }

				imagePicker.cameraDevice = cameraDevice
			}
			imagePicker.allowsEditing = canEditImage
			self.present(imagePicker,
			             animated: false,
			             completion: nil)
		} else {
			self.handler?(SRKCameraResponse.cancelled)
			self.dismiss(animated: false, completion: nil)

    }


    func imagePickerController(_ picker: UIImagePickerController, didFinishPickingMediaWithInfo info: [String : Any]) {

        let selectedPhoto: UIImage
        if canEditImage {
