                 completion: { _ in
                     tempMask.removeFromSuperview()
                     imageViewer.view.removeFromSuperview()
-                    self.transitionInfo.fromView!.alpha = 1
+                    self.transitionInfo.fromView?.alpha = 1
                     transitionContext.completeTransition(true)
                 }
             )

        containerView.addSubview(tempImage)
        
        if transitionMode == .present {
            transitionInfo.fromView!.alpha = 0
            let imageViewer = transitionContext.viewController(forKey: UITransitionContextViewControllerKey.to) as! GSImageViewerController
                imageViewer.view.layoutIfNeeded()
            

            tempMask.backgroundColor = UIColor.black
        
        let tempImage = UIImageView(image: imageInfo.image)
            tempImage.layer.cornerRadius = transitionInfo.fromView?.layer.cornerRadius ?? 0
            tempImage.layer.masksToBounds = true
            tempImage.contentMode = imageInfo.contentMode
        
