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


open class UISideMenuNavigationController: UINavigationController {
    
    fileprivate weak var temporarySideMenuDelegate: UISideMenuNavigationControllerDelegate?
    fileprivate func findDelegate(forViewController: UIViewController?) -> UISideMenuNavigationControllerDelegate? {
        if let navigationController = forViewController as? UINavigationController {
            return findDelegate(forViewController: navigationController.topViewController)

        // 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,
