When you agree to buy a home, you might be thinking about how you’ll make the space your own — where you’ll put your new couch, which bedroom will be best for your kids and what you’ll do to make the outdoor patio a great place to entertain.

However, those decisions should wait until you get a professional opinion on the state of the home. Sometimes, those examinations can turn up reasons to walk away. In fact, home inspection issues are the leading reason real estate contracts are terminated, according to a National Association of Realtors report. Here’s a rundown of potential home inspection deal-breakers:

1. Roofing issues 

You’re buying a home to put a roof over your head, so what happens if that roof needs to be replaced? The average cost to replace or install a new roof lands between about $5,600 and $11,830, according to HomeAdvisor, depending on materials, scope of the project, and other factors. That cost can be quite a bit higher in different locations and based on the type of roof and size of the home.

So, if your home inspector says a new roof is an urgent fix, you’ll need to shell out a big chunk of change immediately after handing over your down payment and closing costs. If you don’t have that money, you might need to terminate the contract.

2. Underground oil tanks

Some home inspections can turn up big surprises. Michele Messina, an associate with RE/MAX Villa Realtors in New Jersey, recalls an inspection that uncovered an underground oil tank previously used for heating purposes on the property.

“We immediately called the specialist in town who knows how to deal with oil tank removal,” Messina says. “That could have been a total deal-breaker, but we worked with the right specialist who knew how to obtain the proper permits and understood the nuances of a state inspection.”

Underground tanks used to be made of bare steel, which tends to corrode over time and can lead to serious issues, including drinking water contamination, according to the U.S. Environmental Protection Agency. So if you can’t get it removed — and get the seller to pay for it — you’ll want to think twice about your purchase.

3. Serious electrical repairs or plumbing problems

Plenty of homes have some small electrical issues — some outlets might be wired backwards, for example — but others can have major deficiencies like aluminum wiring. These can fail and dangerously overheat. Getting rid of aluminum wiring and replacing it is not a small task. If it’s on your inspection report, it’s time to think about turning the lights off on the deal.

Likewise, when a home inspector identifies fundamental issues with plumbing, it can lead to major issues.

“If the waste line isn’t functioning properly, it can be a deal-breaker,” Messina says.

4. Issues with the foundation

Without a solid foundation, things will feel shaky — literally. Foundation issues like cracks, leaks, and bowing walls can be very expensive to fix: The typical cost range for repairing a foundation is approximately $2,140 to $7,470, HomeAdvisor reports. While that isn’t always enough to break up a deal, some foundation issues can be overwhelmingly costly. Stabilizing a foundation, for example, can cost closer to $12,000.

5. Toxic substances

If you’re buying an old home, you might be in love with its vintage charm. However, old buildings might also be loaded with materials that can cause serious health issues. For example, if your home inspection uncovers asbestos or lead paint (and you aren’t prepared to remedy it), you might need to find somewhere else to call your dream home.

6. Termites

While the cost of termite treatment is fairly reasonable (anywhere from $220 to $935, according to HomeAdvisor), let’s face it: You don’t want to deal with bugs in your home. If this turns up on your inspection report, you’ll want to investigate treatment options, but more importantly, also get a sense of the likelihood those pests will return.

7. Major mold damage

Molds are common in homes, according to the Centers for Disease Control and Prevention, so finding it on an inspection report doesn’t have to mean the end of the deal. However, not all mold is created equal. If it has been spreading and left untreated for a long time, the mold presents a serious health hazard — and getting rid of it presents a serious hazard for your finances. Significant mold damage (like mold in drywall) can cost up to $20,000 to safely remove, according to HomeAdvisor.

Should you always walk away from these deal-breakers?

If your inspection report turns up big issues, don’t automatically assume you need to return to your real estate search. The seller knows that the problem will present an issue for another buyer, so there’s an incentive to find a solution with you to avoid dealing with relisting the property.

For example, if the furnace is running on fumes, you might have some additional bargaining power. The seller could be willing to offer a credit for a portion of the estimated cost of a new furnace. You’ll lower your closing costs, and then you can try to squeeze the last life out of that furnace before paying to replace it.

Home inspection issues won’t automatically make the seller cave into your demands, though. With low housing inventory, buyers don’t have as much leverage.

“In a seller’s market, it is difficult for buyers to use inspection issues to their advantage in contract negotiations,” Brent Reichow, Realtor with Matt Lill/Partners in Minnesota, says. “However, if major issues are identified, buyers have two options: They can walk away from the home, given the offer has an inspection contingency, or negotiate with the seller on a reasonable cost to repair or replace.

“My recommendation, in most cases, would be to request the value in seller paid closing costs instead,” Reichow says.