(CNN) A school in Minnesota is apologizing after students who owed lunch balances had their hot meals thrown away.

About 40 students at Richfield High School had their lunches taken away Monday and replaced with cold lunches before school leadership intervened, Richfield Public Schools told CNN on Wednesday. The students had a lunch balance of $15 or more.

"We deeply regret our actions today and the embarrassment that it caused several of our students. We have met with some of the students involved and apologized to them," the district said in a Facebook post on Monday.

Cafeteria workers gave students a cold lunch in place of a hot lunch, which is the existing practice at the school, the statement said.

Superintendent Steven Unowsky told TV station KARE that if a student already has a lunch on their tray, they should be allowed to eat it.

"A hot lunch should never be taken from a child," he told KARE. "One of the things that we can do as adults is model failure with grace. We absolutely failed in this situation and our team is working to try and rectify the mistakes that we've made."

Senior Diamond Johnson was at lunch when she saw a cafeteria worker throwing away lunches. She said it happened at least 10 times before she started recording a video, which she shared with CNN.

"It was happening right after one another. It was in front of everybody, so the whole thing was embarrassing to the students," Johnson told CNN.

Johnson said the way it works at the school is that students wait in line, pick out their food and then punch in their student number before paying.

"The lunch lady that was standing at the computer took the took their food off their trays with her bare hands and put it in a bowl," Johnson said. "They later threw it away, and then the students had to get a peanut butter and jelly sandwich."

Johnson said she shared the video on social media because she wanted to bring awareness to the issue and get helps for the kids who can't afford a hot meal.

"I just wanted everybody to come together and come up with or try to come up with a solution for this problem," she said.

The district said it has $19,669 in outstanding lunch account balances, which includes a deficit carried over from last year.