                                initialSpringVelocity: sideMenuManager.menuAnimationInitialSpringVelocity,
                                options: sideMenuManager.menuAnimationOptions,
                                animations: {
-                                sideMenuDelegate?.sideMenuWillDisappear(menu: self, animated: animated)
+                                activeDelegate?.sideMenuWillDisappear(menu: self, animated: animated)
                                 self.transition.hideMenuStart()
                 })
                 UIView.setAnimationsEnabled(areAnimationsEnabled)

            return findDelegate(forViewController: splitViewController.viewControllers.last)
        }
        
        temporarySideMenuDelegate = forViewController as? UISideMenuNavigationControllerDelegate
        return temporarySideMenuDelegate
    }
    fileprivate var usingInterfaceBuilder = false
    internal var locked = false

        // the view hierarchy leaving the screen black/empty. This is because the transition moves views within a container
        // view, but dismissing without animation removes the container view before the original hierarchy is restored.
        // This check corrects that.
        if let sideMenuDelegate = activeDelegate as? UIViewController, sideMenuDelegate.view.window == nil {
            transition.hideMenuStart().hideMenuComplete()
        }
        
        activeDelegate?.sideMenuDidDisappear(menu: self, animated: animated)
        
        // Clear selecton on UITableViewControllers when reappearing using custom transitions
        guard let tableViewController = topViewController as? UITableViewController,
