About 25,000 apps were removed by Apple from its App Store in China for violating laws of the country that prohibit gambling and the sale of fake lottery tickets. The move by the Cupertino, California, company came after it was criticized by Chinese media for doing too little to adhere to the country’s directives on banned content.

China Central Television (CCTV) first brought up in a July report the existence of apps for the iPhone that are illegal in China, and other Chinese media outlets took up the story soon after. By Aug. 13, Apple had removed over 500 apps in China that showed up if App Store users searched for “lottery”. The company also took down about 2,000 apps that were related to gambling.

“Gambling apps are illegal and not allowed on the App Store in China. We have already removed many apps and developers for trying to distribute illegal gambling apps on our App Store, and we are vigilant in our efforts to find these and stop them from being on the App Store,” Apple said in a statement Monday, the Wall Street Journal reported.

Of the over 1.8 million apps available on the technology giant’s App Store in China, the removed apps account for less than 1.5 percent.

A CCTV report Sunday pointed out that problems and loopholes remain despite Apple’s action. For instance, users who have already downloaded and installed the now-removed apps were still getting updates to the apps, and could continue using them.

This isn’t the first time Apple has taken apps offline in China to abide by the country’s strict censorship laws. In 2017, when the Asian powerhouse began cracking down on Chinese users accessing various banned online services, Apple removed about 700 virtual private network (VPN) apps that allowed users to circumvent Chinese censorship.

Apple cleans up its App Store from time to time in all its markets, removing outdated apps or those it considers spam. The other way it takes action against apps is if a large enough number and proportion of an app’s users report it negatively. However, a large number of positive reports could counterbalance that to some extent, another problematic area since positive reviews can, and sometimes are, bought for money.

China is the world’s most populous country and the second-biggest economy, and a company like Apple — the world’s first to hit a trillion-dollar market capitalization — can ill-afford to alienate authorities there. Its U.S. rival, Alphabet-owned Google, is also considering a return to China after it quit in 2010 over what it said at the time were disagreements with the Chinese government over free speech. The company is now working on a search app — under a project codenamed Dragonfly — that would filter out search results the Chinese government wants censored.

The ongoing trade spat between the United States and China threatens the future of several companies, including Apple and Google, in China. Chinese media may be increasing their rhetoric against U.S. companies as the political back-and-forth over trade continues.