Netflix executives were awarded sham bonuses in order to take advantage of tax law loopholes, according to a lawsuit filed by the City of Birmingham Relief and Retirement System, a company shareholder.

The federal lawsuit, filed in US District Court in San Francisco, alleges Netflix gave “multi-million dollar windfalls” to certain executives, including top content man Ted Sarandos, based on easily achieved milestones.

“Through their conduct, Defendants rigged the compensation process, guaranteeing Netflix officers huge cash payments while misleading investors into believing that these payments were justified by attainment of real performance goals,” the suit alleges.

The lawsuit alleges Netflix gave the bonuses in an attempt to take advantage of a tax law loophole in effect at the time. Under that prior law, public companies could deduct salaries up to $1 million for top executives.

Related Story Netflix Dates 'The Life Ahead' For November Worldwide Release; Film Legend Sophia Loren's First Movie In A Decade To Get Awards-Season Push

However, the compensation above that could only be tax deductible if the bonus goals were uncertain at the time they were set. The Birmingham pension fund suit alleges that the Netflix bonuses were based on streaming revenues, which the company could purportedly easily know once they determined their subscriber counts for the bonus period.

The four executives and their bonuses named in the suit include chief content officer Ted Sarandos ($10.5 million); Neil Hunt, the former chief product officer ($12.6 million); Greg Peters, the current chief product officer ($3.2 million); and general counsel David Hyman ($800,000).

The suit demands damages based on Netflix board members violating fiduciary duty and asks that they return all compensation during the time they were in breach.

A Netflix spokesperson said, “We intend to respond to these claims at the appropriate time.”

Tax law amendments instituted last year saw Netflix change its executive compensation structure, and the company will no longer award bonuses, instead raising salaries.