Smartphone maker Apple Inc and its biggest manufacturing partner on Wednesday said that a small number of students were discovered working overtime in its Chinese factory, violating local labor laws.

The students worked voluntarily in the factory for more than 11 hours a day as part of a school internship program at a plant run by Hon Hai Precision Co Ltd, also known as Foxconn, the manufacturer confirmed.

“We discovered instances of student interns working overtime at a supplier facility in China. We’ve confirmed the students worked voluntarily, were compensated and provided benefits, but they should not have been allowed to work overtime,” Apple said in a statement.

Apple and Foxconn have been accused of poor labor practices in the past, but the U.S. technology giant has been trying to get a grip of such issues, releasing annual reviews of the iPhone supply chain.

The violations announced this week come as the company is stretching to meet demand for its new iPhone X , which began shipping this month.

An earlier report by the Financial Times cited six students who worked overtime at the plant as saying the program was required for them to graduate.

The FT report said the students, aged between 17-19, were being forced by their school to participate in the internship.

“Our policies do not allow interns to work more than 40 hours per week on program-related assignments. Unfortunately, there have been a number of cases where portions of our campuses have not adhered to this policy,” Foxconn said in a statement, adding that the interns accounted for a small part of the workforce.

Apple’s statement said that the company had sent staff to the site to address the violations.

Labor rights groups have previously criticized Apple and Foxconn for excessive overtime, hiring underage workers and failing to provide health insurance.

Since 2012 Apple says it has reduced the number of underage workers in its extended supply chain, which includes locations where rare earth minerals are mined for use in the smartphones.