The U.S. Supreme Court on Monday tightened rules for where patent lawsuits can be filed in a decision that may make it harder for so-called patent “trolls” to launch sometimes dodgy patent cases in friendly courts, a major irritant for high-tech giants like Apple and Alphabet Inc’s Google.

The justices sided 8-0 with beverage flavoring company TC Heartland LLC in its legal battle with food and beverage company Kraft Heinz Co, ruling that patent infringement suits can be filed only in courts located in the jurisdiction where the targeted company is incorporated. Justice Neil Gorsuch did not participate in the decision.

The decision overturned a ruling last year by the U.S. Court of Appeals for the Federal Circuit, a Washington-based patent court, that said patent suits are fair game anywhere a defendant company’s products are sold.

Individuals and companies that generate revenue by suing over patents instead of making products have been dubbed “patent trolls.”

The ruling is likely to lessen the steady flow of patent litigation filed in a single federal court district in rural East Texas because of its reputation for having rules and juries that favor plaintiffs bringing infringement suits.