   while invitationCount > 0
     invitationCount = invitationCount - 1
     invite = data[invitationCount]
+    invite.role = invite.role?.toLowerCase()
 
     if not validateEmail(invite.email) or not invite.role
       notValidInvites = notValidInvites + 1

      alreadyMemberEmails = alreadyMemberEmails + 1
      continue

    if invite.role.toLowerCase() is 'admin'
      adminEmails = adminEmails + 1
      continue

    if invite.role.toLowerCase() is 'member'
      membersEmails = membersEmails + 1
      continue


      continue

    if invite.role
      if invite.role isnt 'admin' and invite.role isnt 'member'
        notValidInvites = notValidInvites + 1
        data.splice invitationCount, 1
        continue

    if invite.email is myEmail
      data.splice invitationCount, 1
      notValidInvites = notValidInvites + 1
      myself = yes
