                             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

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

        updateApps = (apps, callback) ->

                data.color = manifest.getColor()
                data.needsUpdate = false
                try
                    info =
                        git: app.git
                        name: app.name
                        icon: app.icon
                        iconPath: data.iconPath
                    iconInfos = icons.getIconInfos
                catch err
                    console.log err
                    iconInfos = null
