      */
     public static func show(_ animated: Bool = true) {
         if shared.isDismissing {
-            shared.shouldShowAfterDismissing = true
+            shared.isDismissing = false
+            makeKeyWindowVisible(animated)
             return
         }
 
         guard shared.hudWindow == nil else { return }
-        
+        makeKeyWindowVisible(animated)
+    }
+    
+    fileprivate static func makeKeyWindowVisible(_ animated: Bool) {
         shared.hudWindow = shared.getHUDWindow()
         shared.hudWindow?.makeKeyAndVisible()
         

    public static func hide(_ animated: Bool = true) {
        
        func hideProgressHud() {
            MKProgress.shared.shouldShowAfterDismissing = false
            MKProgress.shared.isDismissing = false
            
            MKProgress.shared.stopAnimatoins()

        rootViewController.view.layer.opacity = 1.0
        
        UIView.animate(withDuration: MKProgress.config.fadeOutAnimationDuration, animations: {
            guard MKProgress.shared.isDismissing else { return }
            rootViewController.view.layer.opacity = 0.0
        }, completion: completion)
    }
