Americans were almost as optimistic about the economy in August as they were at the start of the year, when President Donald Trump took office, according to a closely watched consumer-sentiment survey.

The University of Michigan’s sentiment index climbed to 97.6 in August from 93.4 in July, sitting just below a 98.5 reading in January that marked a 13-year high.

The poll of consumers took place before the rioting at the University of Virginia between white nationals and counterprotesters that resulted in one death and scores of injuries.

“Too few interviews were conducted following Charlottesville to assess how much it will weaken consumers’ economic assessments,” said Richard Curtin, chief economist of the survey.

Republicans and to a lesser extent independents have been the most optimistic in 2017, though Democrats aren’t as gloomy as they had been. The economy continues to pump out thousands of new jobs each month, the unemployment rate is at a 16-year low and Americans are better off financially than they’ve been in years.

The Michigan survey, for instance, found a notable increase in the number of people who said their own financial well-being had improved.

President Trump’s agenda to boost the economy, however, could be hurt by his inability to pass major legislation in Washington, especially after Republicans and corporate America abandoned him following his controversial remarks about who was to blame for the violence in Virginia.

“The Charlottesville aftermath is more likely to weaken the economic expectations of Republicans, since prospects for Trump’s economic policy agenda have diminished,” Curtin suggested.

An index that measures current conditions slipped to 111 from 113.4. A gauge that looks out six months rose to 89 from 80.5, however, also marking the highest level since January.