Fix team removing logic for teams