Fix team average calculation