Fix a crash when shuffling teams