                             return
 
                         if result.drone?
-                            appli.state = "installed"
-                            appli.port = result.drone.port
+                            updatedData =
+                                state: 'installed'
+                                port: result.drone.port
 
                             msg = "install succeeded on port #{appli.port}"
                             console.info msg
-
-                            appli.save (err) ->
+                            appli.updateAttributes updatedData, (err) ->
                                 return sendErrorSocket err if err?
                                 icons.save appli, iconInfos, (err) ->
                                     if err? then console.log err.stack

                            stack: err.stack
                        , 500
                else

                    req.application.state = "installed"
                    req.application.port = result.drone.port
                    req.application.save (err) ->
                        if err
                            delete startedApplications[req.application.id]
                            return markBroken res, req.application, err

        broken = (app, err) ->
            console.log "Marking app #{app.name} as broken because"
            console.log err.stack
            data =
                state: 'broken'
                password: null
            if err.result?
                data.errormsg = err.message + ' :\n' + err.result
            else
                data.errormsg = err.message + ' :\n' + err.stack
            app.updateAttributes data, (saveErr) ->
                console.log(saveErr) if saveErr?

        updateApps = (apps, callback) ->
