Park officials in southern Beijing installed facial recognition technology to end a crime spree by Chinese toilet paper thieves that lasted for years.

The Temple of Heaven is an expanse of imperial landmarks in the capital. Park managers there spent three years testing systems, including fingerprinting and laser sensors, to foil the toilet paper looters. They finally settled on the new technology and introduced it over the weekend.

On Tuesday, elderly square dancers taking their bathroom breaks were confronted by a robotic voice telling them to stand in the recognition zone. As they obediently positioned themselves on a yellow square marking one at a time, their faces were displayed on a blinking blue screen mounted to the wall. The machine then dispensed their individual allocation of 23 inches (60 cm) of toilet paper.

Any individual attempting to collect more bathroom tissue within nine minutes was met with a polite denial: “Please try again later.”

It has been known that toilet paper thieves take home complete rolls, hiding them in bulging bags that are not detected at the security gates.

Some of the park’s regulars welcomed the high-tech solution. Pu Meilang, 68, who takes frequent strolls around the Temple of Heaven, noted that it’s a good solution as it thwarts the rule-breakers and leaves others enough to use.

Lei Zhenshan, a marketing manager for Shoulian Zhineng, the Tianjin-based company behind the device explained that the park has tried to put a stop to toilet paper thieves for years. They started testing different ways of tracking toilet paper usage in 2014 and finally settled on facial recognition. There was however some internal dispute when the decision was taken. Zhenshan noted that although it was awkward at first, the degree of waste was severe and they decided to take this technical approach to correcting people’s behavior.

Fingerprinting was rejected as it was thought people might use all ten of their fingers in turn to maximize rations. Zhenshan confirmed that the technology has already reduced toilet paper use by 70% since it was implemented at the Temple of Heaven.

The machines, each costing more than 6000 yuan ($869), were first introduced around the Bird’s Nest stadium in the city’s Olympic Green in June.

Although most of the Temple of Heaven park goers were able to get their bathroom tissues quickly at the east gate on Tuesday morning, some small inconveniences have been reported.

One woman reported that her toddler was too short to reach the camera range.

A 55 year old who came clad in a full black navy uniform as she was partaking in a sailor-style group dance, had to remove her sunglasses and cap before being able to receive her share.

Li Zengxiu, 58, came out of her bathroom stall only to discover that she would not be given additional toilet paper to wipe her hands. She was however happy to make the sacrifice, air-drying her hands instead. Zengxiu felt that saving paper was for the good of the country, but users on the social network Weibo were more skeptical.

Save