There are few quicker ways to ruin a vacation than for your luggage to end up in a different city than you are.

And while nearly every traveler has a story of waiting around a terminal while employees hunt for his or her misplaced bag, the truth is U.S. airlines are doing better than ever at taking care of passengers’ luggage.

Through a combination of new technologies that allow bags to be tracked in nearly real-time and a renewed focus on the basics of handling luggage, airlines last year reported the lowest rate of mishandled bags — those lost, damaged or delayed — since the Department of Transportation began keeping track in 1987.

“Providing a safe, on-time, reliable experience—that includes great hospitality, that includes if they check a bag that it arrives with them on time, it includes the service on board the airplane. It’s an all-in experience,” said Steve Goldberg, senior vice president of ground operations and provisioning at Southwest Airlines, which has cut its rate of mishandled bags 25 percent over the last two years. “It’s not just someone’s bag, it’s someone’s belongings.”

Industrywide, U.S. airlines mishandled 2.7 bags per 1,000 customers last year, beating the previous record of 3.09 from 2012. Compared to a decade ago, U.S. airlines are mishandling 60 percent fewer bags while serving slightly more passengers.

The improvements come at a time when airlines are investing record profits back into their operations. In a consolidated industry where four carriers control 80 percent of domestic traffic, it’s no longer enough for airlines to compete on price and schedule alone, shifting focus to things like on-time performance and bag handling.

The rise of baggage fees also has led passengers to check fewer bags or stick to a single carry-on, leaving fewer bags for airlines to mishandle on a per-passenger basis.

Among major carriers, Delta Air Lines leads the way, with a mishandled bag rate of 1.81 per 1,000 passengers, trailing only smaller carriers like Virgin America, JetBlue and Alaska Airlines.

The Atlanta-based airline made headlines last year when it was the first U.S. carrier to roll out radio frequency identification, or RFID, technology for bag tracking at airports around the country.

The small chips, which are used in myriad ways across many industries, are embedded in luggage tags, allowing them to be automatically scanned as they pass behind check-in, through the bowels of the airport and out to the aircraft.

In addition to saving on the time-consuming manual scanning of bags, the technology provides Delta with reams of data to better optimize its operation, said Bill Lentsch, Delta’s senior vice president of airport customer service and airline operations.

“With barcode scanning, you only capture nine out of every 10 scans—there is some unreliability,” said Lentsch, who added that the company’s $50 million investment in the technology has reduced its mishandled-bag rate by about 10 percent.

“It also gives us confidence that we have such an accurate tracking of our bags that we can proactively communicate to the customer the status of their bag.”

It’s those real-time updates that have proved to be one of the biggest crowd pleasers from the latest technology push around baggage handling. Anxious travelers on many airlines can now check their smartphones to see that their luggage made it to the same plane they’re on. Also, push alerts can guide them to the appropriate luggage carousel without having to crowd around a terminal display board.

The increased visibility of bags throughout their journey also helps airlines when something goes wrong, allowing them to reroute luggage more quickly when a flight is canceled or a passenger misses a connection.

“When you have one of those typical Texas thunderstorms that shuts down operations at the airport, we end up with a lot of bags and a lot of customers going in a lot of different directions,” said Mark Matthews, American Airlines’ director of customer planning operations. “Having that data available allows us to have a better idea of where that bag was last touched.”

American finds itself last among the major carriers for rate of mishandled bags, at 3.38 per 1,000 passengers. That’s still half of its rate from a decade ago, and is at least partly explained by the company’s ongoing integration with US Airways after the 2013 merger.

American introduced a live bag-tracking function for its app in 2015, but still largely relies on manual bag scans by employees to track luggage.

The airline handles about 400,000 bags per day, Matthews said, with each bag getting an average of six to eight scans per one-way trip.

At Southwest, manual scanners are still the tool of choice for tracking bags, although the airline recently tested new types of tracking technologies in Los Angeles at the end of 2016.

In the meantime, the airline has been focusing on the basics, Goldberg said — like verbally confirming a passenger’s destination to make sure a tag is correct and tucking the tags into bags so they don’t come off during transit.

“It really came down to making sure our people had the right tools and the right staffing to do the job at hand,” Goldberg said. “We try to keep things simple for our customers and for our employees. It’s a fairly simple process that can get complex with the complexity of the network and the amount of places we connect people.”

As technology around bag tracking continues to improve, passengers should continue to have new options, including print at home luggage tags and self-service bag drops at the airport. Eventually, trackers that interact with airlines’ baggage handling system could be built into luggage, according to a 2016 report on baggage trends from air transport technology company SITA.

U.S. airlines will also face a new challenge in 2018, when the Department of Transportation revises its metric for mishandled bags. Instead of measuring the number of mishandled bags based on passenger volumes, the DOT will instead measure against the number of checked baggage.

This will effectively cut out passengers who travel with only a carry-on — which can’t be mishandled — from the overall calculation, providing what the DOT said will be a more accurate picture of overall performance.