                                       name: member.name ?? "",
                                       isLead: member.isLead,
                                       isEditable: !member.isLead && editing,
-                                      isLastItem: index == self.team.members.count - 1,
+                                      isLastItem: index == self.team.count - 1,
                                       context: context)
       ])
     }
 
     cells.append([
       SettingsActionCellContext(
-        title: "Invite \(self.team.capacity - self.team.members.count) new team members",
+        title: "Invite \(self.eventTeamLimit - self.team.count) new team members",
         buttonStyle: .plain,
         context: TeamSettingsContext.invite)
     ])

  var cells: [[CellContext]] = []
  var completion: (() -> Void)?

  typealias Member = (fbid: String?, name: String?, image: URL?, isLead: Bool)

  private var teamName: String = " "
  private var eventName: String = " "
  private var team: (members: [Member], capacity: Int) = ([], 0)
  private var isLead: Bool = false

  var editing: Bool = false

      SettingsTitleCellContext(title: "Team Members")
    ]]

    for (index, member) in self.team.enumerated() {
      let context: Context?
      if let fbid = member.fbid, let name = member.name {
        context = TeamMembersContext.remove(fbid: fbid, name: name)
