Apple said on Wednesday it was planning an iPhone software update that could close a loophole that law enforcement agencies exploit to break into phones.

The company said it wants to protect all customers, especially in countries where police, criminals or spies easily obtain phones. The update Apple is planning will effectively disable the phone’s charging and data ports an hour after the device is locked. A person would need to enter the phone’s password to be able to charge it or transfer data to or from the device using the port, according to The New York Times.

Forensic companies have used the data port and special software in the past to get around the settings that allow data to be erased if a user makes a certain number of wrong attempts at the password. One such company, Grayshift, began selling a $15,000 device in March so that police could unlock iPhones themselves, The New York Times reported.

Now, such companies will be unable to run code on the devices after the one hour is over, Reuters reported.

“We’re constantly strengthening the security protections in every Apple product to help customers defend against hackers, identity thieves and intrusions into their personal data,” Apple said in a statement. “We have the greatest respect for law enforcement, and we don’t design our security improvements to frustrate their efforts to do their jobs.”

In 2016, Apple refused the Federal Bureau of Investigation’s request to help them access the iPhone used by an attacker in San Bernandino, and asked the United States government to set up a panel of experts to discuss the implications of such a demand. In the end, the FBI unlocked the phone without the company’s help.