The Washington Post reports that an appeals court has overturned the ruling of a judge in Terrant County, Texas, who ordered a stun belt to be used as punishment during a criminal trial when the defendant refused to answer his questions.

These belts are typically strapped to a defendant’s legs to prevent them from getting violent in the courtroom. However, when Terry Lee Morris appeared before Judge George Gallagher in 2014 to answer to charges of soliciting sexual performance from a 15-year-old, he was shocked three times and scared to the point that he didn’t return for the rest of his trial or his sentencing, says an appeals court.

The Texas Eighth Court of Appeals in El Paso has thrown out Morris’s conviction due to the shocks and the fact that his removal from the courtroom violated his constitutional rights during trial. Because Morris didn’t return to his trial, the appeals court ruled that the use of the shock belt kept him from attending his own trial, which violates the Sixth Amendment, guaranteeing a person’s right to be present and confront witnesses during a trial.

The conviction and ruling were issued on February 28. The court’s ruling also stated that judges may not use such methods simply because a defendant refuses to answer questions or follow court rules.

Stun belts can be very painful, and operate much like a dog’s shock collar. They deliver a 50,000-volt shock for eight seconds, immobilizing a person so that bailiffs may gain physical control over them when they are a danger to others. These shocks can cause a defendant to suffer a seizure, heart irregularities and even cause them to urinate or defecate.

*Photo credit AP/Fort Worth Star-Telegram