After Honolulu police officers protested part of new state bill that would have prohibited undercover officers from having sex with prostitutes during investigations, state lawmakers have amended the proposed bill.

The revised bill went before the Senate committee Friday after it passed the state House, according to Fox News.

The bill was part of lawmakers' plans to crack down on the state's prostitution problem, including removing an existing exemption for undercover officers to sleep with the prostitutes. 

The bill mainly targets pimps and johns by harshening their penalties while making the act of selling sex a petty misdemeanor.

Honolulu Police Maj. Jerry Inouye told the House Judiciary Committee that officers need the protection of the law if they are perform their duties of catching lawbreakers in the act.

"The procedures and conduct of the undercover officers are regulated by department rules, which by nature have to be confidential," Inouye said. "Because if prostitution suspects, pimps and other people are privy to that information, they're going to know exactly how far the undercover officer can and cannot go."

However, not all law enforcement officials believe undercover agents need to be able to sleep with the prostitutes.

Derek Marsh, a California police trainer who specializes in human trafficking cases and has testified twice to Congress about the issue, said the law's exemption for the officers are "antiquated at best" and officers can still perform their duties without it.

"It doesn't help your case, and at worst you further traumatize someone," Marsh said. "And do you think he or she is going to trust a cop again?"

Prostitution Research and Education Executive Director Melissa Farley said the officer-exemption clause in the bill could pose as an opportunity for police misconduct.

"Police abuse is part of the life of prostitution," Farley said.

She also said that in areas where there is no police protections "women who have escaped prostitution" commonly report incidents of officers coercing them into providing sexual favors in exchange for not being arrested.

Chairman of the House Judiciary Committee and Democratic state Rep. Karl Rhoads said Inouye's testimony convinced him to that the state needs the exemption for the undercover officers.

"It's a really murky area," Rhoads said. "I was reluctant to interfere in something they face all the time. If they think it's necessary to not have it in the statute, this is one are where I did defer to them and say, 'I hope you're not having sex with prostitutes.'"