         presentedViewController.view.frame = offscreenFrame
         presentedViewController.view.transform = .identity
         
-        presentedViewController.view.removeObserver(self, forKeyPath: "frame")
-        presentedViewController.view.removeObserver(self, forKeyPath: "transform")
+        invalidatePresentedViewKVO()
 		
 		dismissCompletion?(completed)
 	}

        
        roundedViewForPresentedView.translatesAutoresizingMaskIntoConstraints = false
        containerView.addSubview(roundedViewForPresentedView)
        presentedViewController.view.addObserver(self, forKeyPath: "frame", options: [.initial], context: nil)
        presentedViewController.view.addObserver(self, forKeyPath: "transform", options: [.initial], context: nil)
        
        containerView.insertSubview(presentingViewSnapshotView, belowSubview: presentedViewController.view)
        presentingViewSnapshotView.frame = containerView.bounds

		snapshotViewAspectRatioConstraint?.isActive = false
        
        let heightConstant = ManualLayout.presentingViewTopInset * 2
        print(roundedViewForPresentingView.cornerRadius)
		let aspectRatio = containerView.bounds.width / containerView.bounds.height
        
        roundedViewForPresentingView.cornerRadius = Constants.cornerRadius * (1 - (heightConstant / containerView.frame.height))
        snapshotViewHeightConstraint = presentingViewSnapshotView.heightAnchor.constraint(equalTo: containerView.heightAnchor,constant: -heightConstant)
        snapshotViewAspectRatioConstraint = presentingViewSnapshotView.widthAnchor.constraint(equalTo: presentingViewSnapshotView.heightAnchor, multiplier: aspectRatio)
		
