Fixing error if team is nil.