Fix team settings
Various fixes