Syldavia via Getty Images The Republican-led legislature passed a new bill this month aimed at so-called “fetal homicide” that would define a fetus as a person after 20 weeks of pregnancy.

Lawmakers in New Hampshire scrambled to close a legal loophole on Thursday after passing a piece of legislation that, on paper, may have allowed pregnant women to commit murder without any repercussions.

The Republican-led legislature passed a new bill this month aimed at so-called “fetal homicide” that would define a fetus as a person after 20 weeks of pregnancy. Anyone who caused the death of such a fetus would be liable for homicide or manslaughter charges, in legislation similar to 38 other states.

The language in Senate Bill 66 included notable exceptions for pregnant women who might want an abortion and their doctors. But shortly after both houses of the legislature passed the bill, people said language used to protect women was so vague it could be interpreted to allow them to commit murder against anyone with impunity.

Lawmakers used a legislative maneuver meant to fix minor spelling and grammatical errors to close that loophole on Thursday, and the updated text cleared both the Republican-led House and Senate along party lines.

The politicians had noticed the odd wording more than a week after the bill initially passed, and raised objections that a line reading “any act committed by the pregnant woman” or their doctors would possibly be legal, even “in cases of second-degree murder, manslaughter, negligent homicide, or causing or aiding suicide.”

As various outlets and legal experts note, it’s unlikely pregnant women in New Hampshire would’ve actually been allowed to go around killing people: the state currently has rules that say laws can’t be interpreted literally if they’d provoke an “absurd result.” But that didn’t stop lawmakers from voicing their objections.

“The bill as drafted allows for physician-assisted suicide and allows a pregnant woman to commit homicide without consequences,” Rep. J.R. Hoell (R-Dunbarton) told the Concord Monitor on June 12. “Although that was never the intent, that is the clear reading of the language.”

New Hampshire Democrats had opposed the law, describing it as a “vehicle to undermine protections established by Roe v. Wade,” noting the state already has statutes on the books for increased felony penalties for those who cause the death of an unborn child. As BuzzFeed notes, the provision protecting women was included to appease those fears and protect abortion rights.

Democrats had called for a hearing on the issue, saying it was too notable for the bill to proceed without further discussion, but the bill was sent to the Governor’s desk for a signature regardless, The Associated Press reported.

“No one in this chamber voted to allow anyone to be able to murder anyone. That was not the intent,” the state’s House Majority Leader, Dick Hinch (R), said on the House floor, according to New Hampshire Public Radio.

The act, if signed by the governor, would go into effect on Jan. 1, 2018.