BOSTON (AP) — Fast-food chain Wendy’s has agreed to pay $400,000 to resolve allegations that it violated child labor laws by having teenage employees at dozens of Massachusetts restaurants work later and longer than allowed, the state attorney general’s office announced Tuesday.

The office began investigating after a minor employed at a Wendy’s in Worcester complained that teenagers were working too late into the night and too many hours per day.

Wendy’s provided records to investigators, who found that the restaurant was violating two child labor laws by allowing 16- and 17-year old employees to work past 10 p.m. and more than nine hours per day.

Investigators estimated more than 2,100 violations at 46 corporate-owned Wendy’s International LLC locations across the state.

Wendy’s in response to the investigation has made changes to its employee scheduling system to ensure future compliance, the attorney general’s office said.

“Employers have a duty to follow our child labor laws and protect their young employees,” Attorney General Maura Healey said in a statement. “Wendy’s came into compliance as a result of our investigation and took meaningful steps to ensure a safe and productive work environment for its young workers.”

An email request for comment was left with Dublin, Ohio-based Wendy’s.

(© Copyright 2020 The Associated Press. All Rights Reserved. This material may not be published, broadcast, rewritten or redistributed.)