LANSING, Mich. (AP) — Michigan law will no longer shield police from prosecution for prostitution-related offenses committed while on duty.

Gov. Rick Snyder signed legislation this week to remove the immunity, effective in 90 days.

Michigan was believed to be the last state in the country to give police immunity for having sex with prostitutes during undercover investigations.

A sponsor of the legislation has said she does not believe officers are taking advantage of the law, but it should still come off the books.

Snyder says the bills “help ensure the ongoing integrity and accountability” of the law enforcement system.