– No matter where the Olympics are held, Mark Adams is always prepared to deal with what he calls “teething problems.” The director of communications for the International Olympic Committee knows the world’s largest sports carnival always has its share of glitches and missteps, especially during the first week.

In Rio, though, the problems have been more serious — and they are proving to be more persistent. While athletes such as Simone Biles and Katie Ledecky have taken center stage, the behind-the-scenes issues include blocks of empty seats, a string of violent crimes, doping controversies, poor sportsmanship and the overnight transformation of the water in two pools from blue to hazy green.

Adams and the Rio Olympics organizers have had to address a variety of problems, ranging from food shortages at venues to the fatal shooting of a police officer. But Adams hasn’t given up. Like each of the 10,500 athletes, he came to Rio filled with hope and faith, and he expects the final eight days of the Rio Games will be memorable for all the right reasons.

“There are problems at every Games,” he said. “We have no regrets at all. We will look back at these Games as being a good, good thing for the Olympic movement.

“Rio 2016 is working hard to solve [the problems]. I’m confident they will. I think we got off to a good start with the sports, and let’s face it, that’s what really matters. We just have to make sure we continue to move on.”

Some of the biggest pre-Olympics worries have not come to pass. The mosquitoes that carry the Zika virus have been a no-show, subdued by cool weather and wind. And only one athlete — a Belgian sailor — has reported getting sick from the water at lake and ocean venues.

Crime has been the most serious issue. Though some Rio residents say they feel the city has become much safer during the Olympics, the number of muggings and assaults has unsettled tourists. Portugal’s education minister was robbed at knifepoint, and an attack at Copacabana Beach left a Belgian judoka with a black eye — and without his cellphone — while he was celebrating his bronze medal. A police officer, in Rio to help with Olympic security, died when his vehicle was struck by gunfire after the driver took a wrong turn into a slum.

There have been other incidents in the Deodoro zone, home to eight sports. Days after a bullet pierced the roof of a media tent at the equestrian venue, another was found in the stables. A bus transporting media from the basketball arena to the main Olympic park was attacked, with two windows shattered by a projectile and two people injured.

Security has increased visibly along the roads into Deodoro, a high-crime area, and on some routes in other parts of Rio. Buses now get military escorts from the main road to the venues. Around the city, groups of soldiers with their weapons ready stand in trucks parked on corners or in medians.

Mario Andrada, executive director of communications for the Rio Games organizing committee, said he did not regret claims that Rio would be the safest city on Earth during the Olympics.

“More and more efforts are being made to make sure that Rio can be transformed into a safe city for the rest of the Games,” Andrada said. “We need to rush and fix this problem.”

Olympic organizers were rushing to fix other problems, too. Spectators have been arriving late or not at all at many venues, and the large patches of empty seats have been a major topic of conversation.

Organizers say about 80 percent of tickets have been sold. For the first few days of the Games, security screening was excruciatingly slow; some spectators, after waiting for two hours to get into a venue, simply gave up and left. Andrada said there was a lack of coordination between the agencies handling the screening, and as it has improved, wait times have been reduced.

Sports that are less familiar in Brazil, such as field hockey and rugby, have attracted only a handful of fans. But even the popular ones — including beach volleyball, a national obsession — have had low attendance for some sessions. According to Andrada, 75 percent of Olympics tickets have been purchased by Brazilians, and some are leaving events that don’t feature the home team.

Once inside, fans are often finding more long lines at concession stands that frequently run out of food and beverages. Volunteers also are in short supply. The number already had been cut back from 70,000 to 50,000 because of Brazil’s economic crisis, which triggered reductions to the Olympics budget, and many are not showing up.

While the warmth of the Brazilian people has smoothed over some of the rough patches, it has its limits. Foreign visitors have been surprised to hear the home crowd boo non-Brazilian athletes and ignore sporting etiquette. Adams pointed out they are egalitarian — “they boo athletes from many cultures,” he joked — and few athletes seemed to take it personally.

“It’s always awesome to play in Brazil,” said U.S. men’s volleyball player Matt Anderson. “The fans, even when they’re booing, it means they’re engaged. It motivates us.”

Drug controversies have created tension at the Games, too. On Friday, a Polish weightlifter and a Bulgarian track athlete were declared ineligible and a Chinese swimmer was suspended after failing drug tests.

Athletes have begun to speak their minds more freely, publicly chiding those who have been linked to drug use. Australian swimmer Mack Horton called Chinese rival Sun Yang a “drug cheat,” while Lilly King of the U.S. stared down, called out and beat Russia’s Yulia Efimova in the 100-meter breaststroke.

Saturday, Olympic organizers continued to remedy what they could. They were taking “a more radical approach,” Andrada said, to restoring the water in the diving and water polo pools back to clear blue from the current murky green. There have been several explanations for what happened, but chemicals have not helped, and the main pool will be drained.

Despite a week of damage control, Adams said he is “happy but vigilant” heading into the final eight days.

“We’re enjoying a really good Games,” he said. “I love the atmosphere.

“Would we come and have the first-ever games in South America again? I’m sure we would. It’s important that the Olympics isn’t just a kind of little European or American club. It needs to be spread around the world.”