There are some emergencies that can turn your vacation upside-down. You could lose your luggage after a connecting flight. Your wallet could get pickpocketed at a popular tourist site. Or you could get really sick midway through the trip.

You can prepare for these stressful situations before heading out on vacation. That way, you won’t have to panic if they happen. Here’s how:

1. Losing Your Luggage

Recouping your lost luggage can take a long time — and it’s possible that you won’t get anything back at all. So, you should take some precautions so that you can replace some of your valuables right away:

  • Use a credit card that offers lost or delayed baggage insurance to pay for your tickets.
  • Sign up for a traveler’s insurance plan before your trip. Your insurance could cover the costs of your lost personal items.
  • Start an emergency fund. You can withdraw savings from the fund to replace some of your lost necessities (for example, clothes, toiletries, medications).

What if you don’t have enough emergency savings? If that’s the case, you can try to get a loan online to help you cover the urgent expense. Just make sure that you only use personal loans for emergencies — they’re not meant for other vacation-related expenses, like getting a better hotel room or going to a luxury restaurant.

2. Getting Pickpocketed

Pickpockets can snag your money, credit cards, IDs, smartphone and other essentials in a second. By the time that you notice, it will be too late.

What can you do to protect yourself?

  • Learn common pickpocket tricks to figure out what areas they lurk in and what people they tend to target.
  • Divide up your paper money and store it in different spots (for example, your wallet and your suitcase). If you have multiple credit cards, do the same. This will make it harder for them to nab all of your valuables.
  • Don’t store your valuables in your backpocket. Keep them secure in a zipped crossbody bag or in a neck wallet tucked under your shirt.

Just in case you’re still pickpocketed, you should make photocopies of your credit cards, passport photo and any other important IDs. You can use these photocopies when the originals go missing.

Keep them in a secure place, like the safe at your hotel.

3. Medical Trouble

It’s normal to get a little sick on vacation. You might get indigestion eating at a restaurant or a headache after a long flight. These aren’t emergencies that you need to worry too much about—these can be resolved with over-the-counter medications like antacids and ibuprofen.

However, there are times when getting sick can be an emergency. You could catch a virus and wake up with a dangerous fever, or you could get heatstroke and faint on the beach. In these scenarios, you will need to put your vacation on hold to seek medical attention. In case this happens, you should get travel insurance before you leave — this can help you cover healthcare costs if you’re outside of the USA. You shouldn’t feel compelled to skip medical attention to save money.

Don’t get caught by surprise. Prepare for these vacation emergencies before you pack your bags.