BEIJING (AP) — Chinese consumer spending and factory output edged up in August but still were weak, official data showed Friday, and forecasters warned the second-largest economy is vulnerable to repeated shutdowns of cities to fight virus outbreaks.

Housing sales plummeted while prices edged lower, adding to a slide in real estate activity under pressure from a government campaign to control surging corporate debt that set off an economic slump in mid-2021.

“China’s economy held up slightly better than anticipated last month, but momentum still weakened,” said Julian Evans-Pritchard of Capital Economics in a report. “September is shaping up to be even worse.”

Chinese leaders are trying to prop up economic growth that sank to 2.5% over a year earlier in the first six months of 2022, less than half the official 5.5% target, without big stimulus spending that might push up debt and housing costs.

Economists say this year’s Chinese economic growth might come in below 3%, less than half of last year’s 8.1%. The ruling Communist Party has stopped talking about being able to meet its 5.5% target.

Retail sales, one of China’s most important economic engines, rose 5.4% in August over a year earlier, double the previous month’s 2.7% growth, according to the National Bureau of Statistics. That beat forecasts of 3.3%.

Factory output grew by 4.2%, up from July’s 3.8% but still weak by Chinese standards. Investment in factories, real estate and other fixed assets edged up to 5.8% from the previous month’s 5.7%.

China’s rebound from the pandemic was disrupted by anti-virus measures that shut down Shanghai and other industrial centers starting in March. Those restrictions have eased but controls have been temporarily reimposed on the southern business center of Shenzhen and other cities to control outbreaks.

The economy “remains at risk from future lockdowns,” said Robert Carnell of ING in a report.

The ruling party is sticking with a “zero COVID” strategy that calls for keeping the disease out of China by isolating every case. Officials have responded to complaints about the rising economic cost and social disruption by warning that lifting controls will lead to outbreaks that will be more expensive and destructive.

Housing sales fell 30.3% from a year earlier, reflecting disruption as builders cope with tighter limits on their use of debt. Many buyers appear to be reluctant to spend after thousands of apartments that already were paid for were left unfinished, forcing local authorities in some areas to step in and try to complete them.

Prices paid for new homes declined 0.3% from July.

“As a major pool of Chinese household wealth, this won’t help encourage spending,” said Carnell. “These numbers are likely to remain a blot on the economic landscape for quite a while.”