             case .Failed(let message):
                 //YepHUD.hideActivityIndicator()
                 postButton.enabled = true
-                YepAlert.alertSorry(message: message, inViewController: self)
+
+                let vc: UIViewController?
+                if presentingViewController != nil {
+                    vc = self
+                } else {
+                    vc = oldPresentingViewController
+                }
+                YepAlert.alertSorry(message: message, inViewController: vc)
 
             case .Success:
                 //YepHUD.hideActivityIndicator()


    var preparedSkill: Skill?


    @IBOutlet private weak var feedWhiteBGView: UIView!
    

        }
        
        view.sendSubviewToBack(feedWhiteBGView)

        oldPresentingViewController = self.presentingViewController
        
        isDirty = false

