SHANGHAI (AP) — Hundreds of workers streamed through dark streets, blocking an entrance to an Apple iPhone supplier's factory in eastern China to protest unpaid bonuses and factory reassignments, two witnesses and a U.S. nonprofit group said Thursday.

Jabil Inc., which runs the Green Point factory in Wuxi city, maintains that only 20 to 40 employees were actually protesting and the rest were night-shift workers trying to enter the factory, but vowed to take corrective action over the wage dispute.

"As long as they can present evidence of promises by brokers we will help them to get paid," said a spokeswoman for U.S.-based Jabil, Lydia Huang.

Jabil, in a statement late Thursday, said it was "committed to ensuring every employee is paid fairly and on time."

Apple told the New York-based China Labor Watch that it was investigating and pledged to ensure that workers got fair compensation. "We are requiring Jabil to send a comprehensive employee survey to ascertain where gaps exist in payment and they must create an action plan that ensures all employees are paid for the promised bonus immediately," Apple said in the email to the nonprofit.

The protest highlights the complexity of overseeing global supply chains that can involve hundreds of manufacturers and subcontractors, as well as third-party labor brokers — and their subcontractors — that are tasked with recruiting workers for those factories. Companies differ in the amount of responsibility they are willing to take on. Apple stepped up oversight and disclosure following a spate of negative reports about worker suicides and injuries at suppliers.

After Tim Cook took over as chief executive, in 2011, Apple began publicly identifying top suppliers. It also publishes annual audits detailing labor and human rights performance throughout its global web of suppliers. Apple said it did comprehensive audits of 705 sites last year and documented significant improvements in compliance with its supplier code of conduct.

"About 600 workers went protesting for failing to get their bonus," a worker who asked that only his family name, Zhang, be published for fear of retribution, said Thursday. He said that like many of his colleagues, he was promised a bonus of up to 7,000 yuan ($1,056) if he stayed for 45 days when he signed up for the job through a labor broker. "It has already been over three months but I still haven't got the money," he said.

Tu Changli, a security guard at Jabil's Green Point factory, said a labor broker promised him 2,000 yuan ($302) if he stayed for two months. "I didn't get it at all," he said. He also said he saw hundreds of workers protesting. The company he said he works for, Wu Tai Security Co., declined comment.

Tensions had been running high at Jabil's Green Point factory. Tu, the security guard, said he saw a worker talked down from the edge of a rooftop in late September. And Zhang said that on Sept. 30, he saw a security guard hit a worker with a wooden stick so hard the stick broke.

Apple in its email to China Labor Watch said both incidents had to do with disputes with security guards, not underpayment, and added that it was working with Jabil "to make sure their security guards are properly trained to avoid and de-escalate situations."

The current iPhone 8 and iPhone 8 plus had a 2 percent share of the iOS device market nearly a month after their launch, significantly lagging the 5 percent share grabbed by the iPhone 7 and iPhone 7 plus at a similar point last year, according to Localytics, a mobile engagement platform that analyzes iPhone adoption rates. Analysts attribute iPhone 8 sluggishness to the pending release of the iPhone X.