     }
     
     private func pushViewController(viewController: UIViewController,
-                                   animated: Bool) {
+                                    animated: Bool,
+                                    completion : (() -> Swift.Void)? = nil) {
+        
+        viewController.hidesBottomBarWhenPushed = true
+        CATransaction.begin()
+        CATransaction.setCompletionBlock {
+            if !viewController.isKind(of: MPXLoadingViewController.self) && self.sdkRootViewController == nil {
+                self.sdkRootViewController = viewController as? MercadoPagoUIViewController
+                self.sdkRootViewController!.callbackCancel = {
+                    self.finish()
+                }
+                if let _ = completion {
+                    completion!()
+                }
+            }
+        }
+        CATransaction.commit();
         self.navigationController.pushViewController(viewController, animated: animated)
     }
     

    
    internal static var firstViewControllerPushed = false
    private var rootViewController : UIViewController?
    
    public init(checkoutPreference : CheckoutPreference, paymentData : PaymentData? = nil, discount: DiscountCoupon? = nil, navigationController : UINavigationController, paymentResult: PaymentResult? = nil) {
        viewModel = MercadoPagoCheckoutViewModel(checkoutPreference : checkoutPreference, paymentData: paymentData, paymentResult: paymentResult, discount : discount)

        var  newNavigationStack = self.navigationController.viewControllers.filter {!$0.isKind(of:MercadoPagoUIViewController.self) || $0.isKind(of:CheckoutViewController.self);
        }
        self.navigationController.viewControllers = newNavigationStack;
        // Actualizar rootVC de sdk
        self.sdkRootViewController = self.navigationController.viewControllers[0] as? MercadoPagoUIViewController
        
	}
	
