fixed adding a player twice in a team and refactor error cases management