SALT LAKE CITY — Utah lawmakers want to fix gaps in domestic violence law that were exposed when a man killed his ex-girlfriend and her son by opening fire on a car full of children after school.

Memorez Rackley, who was killed in June 2017, couldn’t have gotten a protective order despite a previous stalking report because the onetime couple had never been married or lived together, a distinction that Republican Sen. Todd Weiler called lunacy.

“I just could not get that out of my mind,” he said. “A protective order is a piece of paper that will not stop a bullet, but it does make a difference, especially if someone is lurking outside your house.”

The legislation is now before the Utah House after clearing the Senate on Monday. It would also bar perpetrators from schools and make other revisions, such as setting a default expiration date and narrowing the definition of a family member, said Weiler of Woods Cross.

Rep. Angela Romero, a Salt Lake City Democrat and co-sponsor of the measure, said they’re hoping the changes mean victims don’t stay in the shadows for fear of a complicated process or not being believed.

“We really wanted to ensure that victims are protected,” she said.

Rackley would have been eligible to get a stalking injunction, but that court order doesn’t spark an arrest on the first offense. She started court paperwork the morning before her death, police said.

If it becomes law, the measure would bring Utah in line with a growing number of states that have revised the traditional definitions of relationships in which domestic violence can happen, said Mark Wynn, a police consultant and retired police lieutenant who served with Nashville’s domestic violence division.

“The dynamics are the same, and the issues are the same,” he said.

Rackley had called 911 three days before her death to report her ex-boyfriend, Jeremy Patterson, was stalking her with threatening text messages, including pictures of her children, police said. But because they weren’t married or living together, officers didn’t formally treat the report as a domestic violence case.

That meant she wasn’t connected with shelters or help navigating the court system.

Sandy police officers told Patterson to stop contacting her. They advised Rackley to stay with a friend and told her how to apply for a court order, but they did not ask a series of questions designed to determine whether the case could turn deadly. The department has since changed that policy.

Rackley died along with her 6-year-old son, Jase, after Patterson confronted her on the way home from the boy’s elementary school on June 6.

Rackley, who had her two sons in tow, tried to get away in a car that stopped to help, but Patterson followed, police said. He rammed the vehicle with his truck and opened fire, killing the mother and son and wounding two other children. Patterson then shot and killed himself.

This story has been corrected to show that Memorez Rackley’s name was misspelled on some subsequent references.