Once upon a time, hosting the Olympics seemed like a good idea for Rio de Janeiro. The games would provide a catalyst for much-needed infrastructure improvements, complete with funding and must-meet deadlines.

But when the Olympic torch lit the cauldron in Maracana Stadium on Friday night, many Brazilians surely wondered, "How did we get such a raw deal?"

As the 2016 Summer Games begin, the city's transportation system is hardly ideal: Transit lines that benefit the middle and upper classes, rather than the people who need them most. A subway system delayed by cost overruns and untested as hundreds of thousands of people descend on the city. Walls that shield visitors from favelas—too bad if you actually live in one of them. Olympics infrastructure projects displaced 77,000 Rio residents, Smith College economist Andrew Zimablist estimates.

Other cities have followed the bait into this trap. Montreal needed 30 years to pay down its $1.48 billion debt from the 1976 Games. Athens’ empty venues, the legacy of its $11 billion 2004 foray, have earned it a place in the Ruin Porn Hall of Fame. Meanwhile, Beijing is pouring more than $9 billion into high-speed rail projects linking the city to skiing areas for the 2022 Winter Games—even though those places face the prospect of serious drought.

Calls for a new approach—a permanent host city, or holding the Games in multiple cities simultaneously, for example—aren't catching on. And so things go on, as they always have. PyeongChang, South Korea, hosts the 2018 Olympiad, and Tokyo the one after that.

Granted, some cities have done this well, tremulously but successfully parlaying their duties into longterm positives. Here’s a guide for future hosts aiming not to screw the transportation pooch.

Put the City Before the Games

The worst mega-event stumbles occur when cities build infrastructure without a firm urban master plan in place. “The entire transportation investment of the [Rio] games have been captured by the event agenda, and that’s ridiculous,” says Christopher Gaffney, a geographer with the University of Zurich who studies mega-events in Brazil. Subway lines, buses, and roads should be designed to serve the locals, not the visitors.

Some places have largely pulled this off. Barcelona, Spain, which played host in 1992, had already built or was in the midst of building 32 of 37 Olympic venues before the IOC even selected it. The city used the mega-event to spur the construction of its already planned *rondes, *circular highways that keep traffic out of downtown. The Games often are credited with transforming Barcelona into a tourist hub—though it would've been nice if the $11.4 billion celebration didn't yield a 412 percent cost overrun.

Don’t Let the Bidding Process Win

Bidding is exciting—and crazy expensive. These days, cities can spend up to $100 million simply seeking an olympiad, starting with hundreds of thousands of dollars in upfront payments to the International Olympic Committee for the privilege of taking part. Worse, the process inclines cities to underestimate costs, leading to nutty overruns. Like, nearly double or triple the estimated cost, according to a recent study. London, which hosted in the Olympics in 2012, ended up paying $11 billion for what it said would be a $5.5 billion event.

Cities need to get real about what their citizens will actually pay for these investments, and let them decide whether to spend that money.

Do Not Skimp on the Good Stuff

Deadlines can be helpful for projects that tend to drag on (see: New York's Second Avenue Subway), but they bring risks. “You can’t go cheap and easy and fast,” says Eva Kassens-Noor, an urban planner with Michigan State University. For example, Rio probably should have expanded even further on its hardy, high-capacity rail system. Because it was low on money and short on time, it pivoted to bus rapid transit systems in some areas. Not bad, but not ideal. This is why that drop-dead torch ceremony date is a killer, Kassens-Noor says: It forces to cities to make on-deadline decisions they might later regret.

Keep the People in the Know

This doesn’t necessarily mean putting hosting duties up for a vote. “Democracy in the voting sense is not enough,” says Gaffney. Instead, the bidding process itself should go through rigorous open-door makeover. Give community groups a voice on where that new subway line should go—or if it should go at all. Hold public meetings. Make the real costs of construction available for all to evaluate.

Don’t Host the Olympics

If this all sounds difficult, it should. There’s reason to think cities should balk at hosting the Olympics. Zimbalist, the Smith College economist, is a major proponent of a permanent Olympics host city. One Olympic village, one perfectly-wrought transportation system, a few venues that will definitely be used every four years. “Once you get rid of this ridiculous notion that by throwing a party for 17 days, you promote economic development—and I think gradually we are—then it’s not a problem to say there’s gong to be one host, because that one host isn’t gaining anything,” Zimbalist says. “It’s simply serving the world Olympic community.”

Another idea: Host the Olympics in many cities simultaneously. That way, several countries bear the cost—and share the joy—of the Olympics, and get a guarantee their venues will see serious use every few years.

While we wait for the world to get smart about mega-event transit investments, try to enjoy the ride, Rio. Just hope it doesn't break down between stations.