Whether it’s a technical issue or an overbooked plane, a lot of factors can get between you and a stress-free flight. Air travel is especially unpredictable during snowstorm season, with up to tens of thousands of flights getting canceled in the U.S. each winter. If you find yourself the victim of a cancellation, there are a few important tips to remember to make sure you receive the maximum amount of compensation.

As Business Insider recently shared, the most important step to take after your flight gets canceled is to contact the airline directly. No matter which company you’re dealing with, you should be guaranteed two contractual rights in the event of a cancellation: The airline must either find you a seat on their next available flight to your destination or refund the remaining value of your ticket. Airlines sometimes provide extra assistance in addition to these basic rights, so make sure to ask about what you’re owed. The reason for the cancellation also makes a difference—for example, airlines are usually more accommodating when the fault lies with them rather than outside forces like the weather.

After speaking with your airline, check to see if your credit card offers special protection in such scenarios. Chase Sapphire, Chase’s United Airlines Explorer card, and some Citibank American Airlines Advantage cards include built-in emergency funds to use on a hotel if an airline leaves you stranded. Cardholders are usually given between $300 and $500 to spend.

Travelers flying to or from Europe may be able to receive more money than their canceled flights were worth. According to the EU’s air passenger rights policy, customers dealt canceled flights traveling within the EU, from EU-based airports, or on EU-based airlines are eligible to receive €600 (about $666) in compensation plus the cost of meals and lodging. The provision may not apply to shorter flights or trips canceled "due to extraordinary conditions."

If keeping tabs on your passenger rights seems like a lot to juggle, there are websites that can help you. Refund.me and Airhelp.com are two resources that will fill out your paperwork for you and retrieve the maximum amount of whatever you're owed (keep in mind these sites do claim part of the money they get back, sometimes as much as 25 percent).

A smart way to avoid all this hassle is to book through an airline that’s less likely to cancel your flight in the first place. According to Travel + Leisure, ExpressJet, Delta’s Comair, and AmericanEagle are the worst offenders in this department.

[h/t Business Insider]