If you travel often then it’s likely you’ve had to succumb to an extra search from a TSA agent. Whether it’s in your hair or an actual body search, it can feel pretty invasive especially in front of other fliers. Now, you may be able to do something about it.

Last Friday, the 3rd US Circuit Court of Appeals in Philadelphia declared that TSA screeners act as “investigative or law enforcement officers” when searching passengers, meaning they can be subject to civil claims for intentional wrongdoing under the Federal Tort Claims Act. The decision reverses a controversial 2018 ruling by a three-judge panel from the same court that effectively gave TSA officers immunity under the law.

The court ruled that the agents are no longer immune when they engage in abusive behavior or intentional misconduct.

Related: Get Ready For Shorter TSA Lines When Flying Out Of The U.S.

The judges who dissented in the case are afraid that this new rule will open up the flood gates to passengers suing the government over searches. However, Circuit Judge Thomas Ambro noted that in 2015, less than 200 of the 700 million passengers screened filed complaints that could potentially have led to waivers of government immunity for the TSA.

Attorney Paul Thompson was excited to hear the news after his client Nadine Pellegrino, sued the TSA over a 2006 incident in which she was imprisoned for 18 hours and charged with crimes including assault and making terroristic threats, after objecting to an especially invasive screening as she attempted to board a US Airways flight at Philadelphia International Airport.

While she was found not guilty of the charges, she was not allowed to sue under the agency’s prior government immunity.

Following the decision Thompson stated: “if you think you are a victim of intentional misconduct by TSA agents, you can now have your day in court.”