Kroger has agreed to pay $8.5 million to resolve a class-action lawsuit alleging the company has failed to treat patients properly.

The class action lawsuit was filed by patients, including a grandmother, who say they were left with severe pain, dizziness and vomiting after undergoing surgery for a heart condition in 2011.

A Kroger spokesman said the company is cooperating with the investigation.

“We want to make sure that our employees and the community have the best possible experience during these difficult times,” the spokesman said.

The company is expected to file a motion to dismiss the lawsuit on Wednesday.