Last week, the Internet was abuzz with news of a seven-year-old boy who was removed from an Allegiant Air flight after he had an allergic reaction to a dog on the plane. Some passengers reportedly clapped when the boy and his family were escorted out of the cabin. Though the applause was extremely unfortunate, Allegiant stands behind the decision to remove the family from the plane to ensure the boy’s safety.

But the incident begs the questions: What is the protocol when a passenger has an allergic reaction to something on a plane—be it a pet, peanuts, or pollen from a seatmate’s flowers? And if you do have severe allergies, what can you do—and what are your rights—to avoid a reaction while flying?

A spokesperson for the Federal Aviation Administration (FAA) explains that there are overarching federal guidelines on how airlines should handle passenger allergies, but that each airline’s protocol varies. Allegiant, for one, states on its website that, “Allegiant does not guarantee an allergen-free flight. Upon request, Allegiant will attempt to reseat a passenger affected by an allergy in an effort to minimize the passenger’s exposure to the allergen.” According to some reports of the aforementioned incident, that’s exactly what happened: The little boy was reseated away from the dog in an attempt to alleviate his reaction, but when the symptoms persisted, the on-call doctor advised that it would be safest for him to leave the plane.

It turns out that Allegiant’s policy falls squarely within FAA guidelines. The FAA explains that it is impossible to create a completely allergen-free flight. For instance, even though there are some airlines that don’t allow pets on board, and with other airlines, you can call ahead to ask if there is a pet traveling on your flight, the FAA warns that no cabin will ever be completely dander-free. This is because animal allergens are carried on the clothes of other passengers.

“You can find pet dander in about 50 percent of homes that don’t even have a pet, so if you extrapolate that to a plane, you can imagine that there will be dander in the air,” says Selina Gierer, D.O., assistant professor of allergy and immunology at the University of Kansas Hospital in Kansas City. Similarly, if the airline does not serve peanuts (a common allergen), or is willing to accommodate a request to avoid serving peanuts on your flight, they still can’t stop another passenger from bringing a PB&J sandwich on the plane. But this doesn’t mean that you are doomed to have an allergic reaction while flying. There are plenty of ways that you can avoid symptoms if you prepare ahead of time and work with the airline crew. Here’s how:

Call the airline before you book your flight to find out their policies. Most airlines will tell you if there are pets booked on the flight, or if they will avoid serving nuts. “Airlines are usually very good about honoring requests from customers, and may announce to the cabin that due to a traveler with a peanut allergy, they will not be serving peanuts,” says Dr. Gierer. “But that is not something that every peanut allergic person has to do.” She explains that most people are only sensitive to foods when they actually touch or ingest them. It’s much rarer for someone to have a reaction to breathing in peanut dust floating in the air. Pet dander, on the other hand, gets aerosolized and can often affect allergy sufferers without any physical contact.

Prep wisely. Talk with your doctor about which medications you should take and when. “You may be able to take your allergy medications shortly before boarding the plane to ensure they are at the greatest efficacy,” says Dr. Gierer.