     /// i.e. when just the status bar moves, nothing happens
     private func updateSnapshotViewAspectRatio() {
         guard let containerView = containerView,
-              presentingViewSnapshotView.translatesAutoresizingMaskIntoConstraints == false
+              snapshotViewContainer.translatesAutoresizingMaskIntoConstraints == false
         else {
             return
         }

        ///    such that it's top edge is at the same position. In order to do
        ///    this, we translate it up by half it's height, perform the
        ///    scaling, and then translate it back down by the same amount
        let transformForSnapshotView = CGAffineTransform.identity
            .translatedBy(x: 0, y: -presentingViewSnapshotView.frame.origin.y)
            .translatedBy(x: 0, y: ManualLayout.presentingViewTopInset)
            .translatedBy(x: 0, y: -presentingViewSnapshotView.frame.height / 2)
            .scaledBy(x: scaleForPresentingView, y: scaleForPresentingView)
            .translatedBy(x: 0, y: presentingViewSnapshotView.frame.height / 2)
        
        /// For a recursive modal, the `presentingView` already has rounded
        /// corners so the animation must respect that
        roundedViewForPresentingView.backgroundColor = UIColor.black.withAlphaComponent(0)
        roundedViewForPresentingView.cornerRadius = presentingViewController.isPresentedWithDeck ? Constants.cornerRadius : 0
        containerView.insertSubview(roundedViewForPresentingView, aboveSubview: presentingViewSnapshotView)
        roundedViewForPresentingView.frame = initialFrame
        
        /// The background view is used to cover up the `presentedView`
        backgroundView.backgroundColor = .black
        backgroundView.translatesAutoresizingMaskIntoConstraints = false
        containerView.insertSubview(backgroundView, belowSubview: presentingViewSnapshotView)
        
        NSLayoutConstraint.activate([
            backgroundView.topAnchor.constraint(equalTo: window.topAnchor),

        }
        
        backgroundView.removeFromSuperview()
        snapshotView?.removeFromSuperview()
        snapshotViewContainer.removeFromSuperview()
        roundedViewForPresentingView.removeFromSuperview()
        
        let offscreenFrame = CGRect(x: 0, y: containerView.bounds.height, width: containerView.bounds.width, height: containerView.bounds.height)
