Shopping for a new home can be an exciting, fun, and rewarding experience. However, when buying a new home, it’s important to look for certain features that may indicate costly repairs down the line. Not every house makes its flaws immediately known, and problems can stay hidden from view until they become detrimental.

Just ask Annemarie Kill and John Duffy. When they purchased their first house in Chicago in the early 2000’s, they had no idea that the back of it had been sinking for 75 years. Their inspector had failed to unveil the old, rotting posts that provided the foundation for the rear section, and Annemarie and John would find themselves spending hundreds of thousands of dollars on additional construction and repairs. This included replacing the posts and pouring concrete to raise the foundation, which unfortunately caused their newly-installed tiles and windows to crack.

Rotten posts are just one sign of a poor or compromised foundation. A door that doesn’t correctly close, uneven stairs, or a tell-tale crack in the foundation all indicate structural foundation failure. This can lead to additional problems such as water entering the home, damaged pipes, and other issues that can cost in excess of $20,000 in severe cases. Often times, mudjacking is required to restore the foundation to its original level.

According to AAA Concrete Raising, if a poor foundation does lead to flooding and water damage, it can be detrimental. That’s why it’s important to know the signs of water damage when touring a new home or apartment. See if you can detect any discoloration on the walls and ceilings that may point towards a water leak. A yellow spot on a white wall, for example, would be your first clue. Warped hardwood floors are also a sign of water damage, and could potentially harbor rotten wood or mold underneath. Underlying causes of water damage range from leaking pipes due to poorly installed or failed plumbing, to improper drainage, to extreme weather.

You’ll also want to check the basement for signs of water leakage, as it’s commonly known for being a problem area. If the air smells moldy or musty, it could indicate an issue. Scan the bottoms of the walls for any signs of a leak, and if your basement has concrete flooring, be mindful of any cracks or gaps.

Although water damage can cause uneven flooring, it’s not always the culprit. There are a number of causes of settlement issues, including poor or improperly compacted soil, termites, and even trees sucking up the water from the underlying soil and causing it to sink. Additionally, home inspectors generally cannot determine what causes uneven floors in a home—for that, you’ll need a structural engineer.

Foundation issues can quickly add thousands to tens of thousands or more to your already long list of expenses associated with buying a new home. Prevention and knowing the warning signs are the key, however there are solutions available for those who have found themselves unlucky enough to be the victims of a “money pit” due to a poor foundation.