         setTimeout () ->
             if startedApplications[req.application.id]?
                 delete startedApplications[req.application.id]
-                return mark_broken res, req.application,
+                return markBroken res, req.application,
                     stack: "Installation timeout",
                     message: "Installation timeout"
 

    stop: (req, res, next) ->
        manager = new AppManager
        manager.stop req.application, (err, result) ->
            return mark_broken res, req.application, err if err

            data =
                state: 'stopped'
                port : 0

            req.application.updateAttributes data, (err) ->
                return send_error res, err if err

                manager.resetProxy (err) ->
                    return mark_broken res, req.application, err if err
                    res.send
                        success: true
                        msg: 'Application stopped'

        req.body.slug = req.params.slug
        manager = new AppManager()
        manager.uninstallApp req.application, (err, result) ->
            return markBroken res, req.application, err if err

            req.application.destroy (err) ->
                return sendError res, err if err

                manager.resetProxy (err) ->
                    return sendError res, proxyErr if err

                    res.send
                        success: true
