       let originalSelector = Selector("pushViewController:animated:")
       let swizzledSelector = Selector("AM_testPushViewController:animated:")
       
-      swizzleMethod(UIViewController.self, originalSelector: originalSelector, swizzledSelector: swizzledSelector)
+      swizzleMethod(UINavigationController.self, originalSelector: originalSelector, swizzledSelector: swizzledSelector)
     }
     
     dispatch_once(&Static.popToken) {
       let originalSelector = Selector("popViewControllerAnimated:")
       let swizzledSelector = Selector("AM_testPopViewControllerAnimated:")
       
-      swizzleMethod(UIViewController.self, originalSelector: originalSelector, swizzledSelector: swizzledSelector)
+      swizzleMethod(UINavigationController.self, originalSelector: originalSelector, swizzledSelector: swizzledSelector)
     }
     
     dispatch_once(&Static.popToVCToken) {
       let originalSelector = Selector("popToViewController:animated:")
       let swizzledSelector = Selector("AM_testPopToViewController:animated:")
       
-      swizzleMethod(UIViewController.self, originalSelector: originalSelector, swizzledSelector: swizzledSelector)
+      swizzleMethod(UINavigationController.self, originalSelector: originalSelector, swizzledSelector: swizzledSelector)
     }
     
     dispatch_once(&Static.popToVCToken) {
       let originalSelector = Selector("popToRootViewControllerAnimated:")
       let swizzledSelector = Selector("AM_testPopToRootViewControllerAnimated:")
       
-      swizzleMethod(UIViewController.self, originalSelector: originalSelector, swizzledSelector: swizzledSelector)
+      swizzleMethod(UINavigationController.self, originalSelector: originalSelector, swizzledSelector: swizzledSelector)
     }
     
   }

        VCs.removeFirst()
      }
      self.AM_testViewControllers = nil
      return VCs
    }
    

    if let VCs = self.AM_testViewControllers {
      let newVCs = VCs + [viewController]
      self.AM_testViewControllers = newVCs
      
    } else {
      self.AM_testViewControllers = [viewController]
    }
    self.addChildViewController(viewController)
  }
    
  func AM_testPopViewControllerAnimated(animated: Bool) -> UIViewController? {
    if var VCs = self.AM_testViewControllers {
      let poppedVC = VCs.removeLast()
      poppedVC.removeFromParentViewController()
      
      self.AM_testViewControllers = VCs
      return poppedVC
    }
