     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
     }

          foundVC = true
          
        } else {
          poppedVCs.append(VCs.removeLast())
        }
      }
      

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