RICHFIELD, Minn. (CNN) – A public school in Minnesota is apologizing to students after throwing their hot meals away.

About 40 students at Richfield High had their hot school lunches taken away Monday. School officials say the reason was because the students owed $15 or more on their lunch balance.

The hot meals were taken away and replaced by cold lunches.

In a Facebook post, the district said “We deeply regret our actions today and the embarrassment it caused.”

One of the seniors captured the incident in the cafeteria on social media and it went viral. School superintendent Steven Unowsky said that if a student has a lunch on their tray, they should be allowed to eat it.

The school district says it is owed nearly $20,000 in outstanding lunch balances. Administrators say they are trying to solve the shortfall by raising money in the community and they won’t try embarrassing students who can’t pay again.