                             if err
                                 errors[server_id] = err
                             c()
-                async.map misc.keys(@servers), f, (err) =>
+                async.map misc.keys(@servers.by_id), f, (err) =>
                     if misc.len(errors) == 0
                         opts.cb?()
                     else

                                # b is better
                                return 1
                        # Next compare health of server
                        health_a = @servers[a.replica_id]?.health
                        health_b = @servers[b.replica_id]?.health
                        if health_a? and health_b?
                            health_a = Math.round(3.8*health_a)
                            health_b = Math.round(3.8*health_b)

                                            cb()
                (cb) =>
                    if port?
                        dbg("success -- we got our host #{server_id} at port #{port}")
                        @_update_project_settings(cb)
                    else
                        dbg("fail -- not working yet")
                        cb(true)
