Group words take a singular verb when they are used in the singular, and a plural verb when they are used in the plural:
A team of experts was called in to investigate the problem.
There was a flock of about 30 sheep in the field.
Gangs of youths were fighting one another in the streets.
There were swarms of flies everywhere.
Sometimes, singular group words are followed by a plural verb, but some people may consider this to be incorrect: