A 2003 federal law aimed at preventing the use of “party drugs” like ecstasy at raves might be more harmful than helpful, according to one researcher.

The law targets club promoters for offering services like water, medics, and testing drugs for safety — since these actions might mean drugs are present at the party. But the law might backfire by making it more likely for people to overdose or overheat without water or medical assistance. Referred to as the Federal Reducing Americans’ Vulnerability to Ecstasy (RAVE) Act, the federal law dictates that club promoters and event organizers can be prosecuted if they don’t stop their patrons from doing drugs at their events. It targets organizers of big raves or dance parties who allow the use of drugs made from MDMA — like ecstasy or Molly.

Ecstasy and ecstasy-related drugs push your core temperature up to extreme highs. These drugs can be dangerous when the user becomes overheated and dehydrated after dancing all night in a hot, crowded area and doesn’t drink enough water. “Their temperatures were like 106 or 107 degrees,” Anderson told LiveScience of some victims. “They basically burned up.” Others die from overhydrating to compensate for the overheating, and “essentially drown themselves.”

So it’s understandable why there’s a federal law trying to curb those unnecessary deaths, but Anderson argues that the law itself might be doing more harm than good. In fact, she points out that electric dance music festivals have seen 15 people die worldwide recently. “It puts [club promoters and organizers] in an impossible position of protecting their clientele while abiding by the provisions of the act,” said Tammy Anderson, a sociologist at the University of Delaware and an author of the study.

In other words, if club promoters aren’t allowed to set up precautions — like water, medics, and drug safety tests — rave-goers might be more likely to get in trouble. “[I]f the promoter — like Electric Daisy Carnival — provides water, it’s an indication that they must know that drug use is going to happen at their event, because they’re trying to hydrate their clientele who get dehydrated from dancing on Molly or ecstasy,” Anderson said.

However, sometimes just water or medics won’t be enough to save lives. Plenty of people die from drug toxicity or drug-related car crashes during or after big raves — many of them young students in their teens or 20s. Victims will typically begin experiencing seizures, then cardiac arrest, and are deemed dead from overdosing.

So how can we prevent these deaths? Firstly, don’t take hard drugs — or mix drugs — when going to festivals or raves, as this might increase your chances of overheating, dehydration, and cardiac arrest. Anderson mentions that festivals can take precautions, too: such as providing medics and holding parties during cooler times of the day or year.