     updatestoppable: (req, res, next) ->
         Application.find req.params.id, (err, app) ->
             if err
-                send_error res, err
+                sendError res, err
             else if app is null
-                send_error res, new Error('Application not found'), 404
+                sendError res, new Error('Application not found'), 404
             else
                 Stoppable = req.body.isStoppable
                 Stoppable = if Stoppable? then Stoppable else app.isStoppable

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

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

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

                    res.send
                        success: true

            req.application.password = randomString 32

        manager.updateApp req.application, (err, result) ->
            return markBroken res, req.application, err if err
            req.application.state = "installed"

            manifest = new Manifest()
            manifest.download req.application, (err) =>
                return sendError res, err if err
                req.application.permissions = manifest.getPermissions()
                req.application.widget = manifest.getWidget()
                req.application.version = manifest.getVersion()
