In July, before hundreds of friends and family members, I vowed to love, protect, and remain faithful to my wife till death do us part. As a newly married 23-year-old, it’s difficult for me to imagine a scenario in which I’d break those sacred vows, but recent events have filled me with a healthy fear of just how powerful temptation can be.

In the wake of the Ashley Madison hack, many Christians, including pastors and other church leaders, are facing the consequences of sin as their infidelity is being publicly and painfully revealed. Ed Stetzer estimates that at least 400 church leaders could resign because of the hack. It’s impossible to know how many lives will be ruined in the wake.

While the Ashley Madison scandal has landed infidelity on the front page of our newspapers and national discourse, there’s nothing novel about cheating. It happens all the time. Growing up as a pastor’s kid, it felt like my parents were counseling a new couple through unfaithfulness every day. Over the past few years I’ve seen several spiritual mentors destroy their lives by cheating on their spouse.

It’s scary seeing older Christian men and women, many of whom I’ve looked up to, struggle with such destructive sin. When I hear these stories, I’m no longer shocked or surprised. Instead, one question comes to mind: if they are capable of this, who’s to say I’m not?

I ponder this question often. Here are three wise pieces of advice I’ve gleaned from pastors, mentors, and friends over the years.

1. Admit your weakness.

No one signs a marriage license planning to cheat on his or her spouse. My marriage is less than two months old, and right now staying faithful is easy. Of course it is—we’re in the honeymoon phase. Our biggest argument has been over how long to leave the kitchen fan on after cooking bacon. But that won’t always be the case. Sooner or later marriage will get harder, life will become more complicated, and the temptation to find fulfillment, affirmation, and love elsewhere will rise.

A mentor once told me that the moment you start to believe you’re not capable of committing adultery is the moment you begin to put your guard down. If king David, whom God called “a man after my own heart,” can fall into sexual sin, then there’s no reason to self-righteously assume I’m above it. That’s true for all of us.

I once heard a story about a pastor interviewing for a position at a church. The interviewer asked if he was susceptible to any particular secret sins or struggles that might damage his ministry. The pastor paused for a second and said, “There is no end to the depths of sin I’m capable of falling into.”

Admitting we are weak is the first step in protecting ourselves from the temptations that may cause us to stumble.

2. Wage war against sin.

A close friend whose marriage was torn apart by infidelity once told me the seeds of his sin that grew into a full-blown affair were planted in middle school. That’s when he began looking at pornography. At the time, indulging in lustful thoughts and desires seemed relatively harmless, but when he began tolerating sin he gave it opportunity to grow.

It’s almost certain none of the church leaders caught in infidelity became cheaters overnight. It was a gradual process. It has been said sin takes you farther than you want to go and makes you stay longer than you want to stay. As the apostle Paul says, “For the one who sows to his own flesh will from the flesh reap corruption, but the one who sows to the Spirit will from the Spirit reap eternal life”  (Gal. 6:8). When we live according to the desires of the flesh rather than the Spirit, we suffer the consequences.

We must be intolerant of any and all sin in our lives, acknowledging that what feels harmless today could lead to death tomorrow.

3. Build fences.

Tim and Kathy Keller use the metaphor of cultivating a garden to talk about what it takes to cultivate a healthy marriage. Healthy marriages require attention, nourishment, and pruning. A marriage won’t grow if you aren’t spending quality time with your spouse, communicating clearly, and working through conflict together.

Like healthy gardens, marriages also need fences. The fence protects the garden from things that would destroy it. Billy Graham famously said he would not meet, eat, or travel with a woman alone. Not only was he protecting himself from temptation, but he was also protecting his marriage and ministry from any potentially damaging allegations.

While my wife and I might not completely subscribe to the Billy Graham rule, I respect the thought and intentionality behind it. If there’s one thing we can learn from older men and women who have struggled with these particular temptations, it’s that we all need to implement safeguards to help protect us from making bad decisions.

After hearing yet another story of porn nearly ruining a friend’s marriage, I installed Covenant Eyes on my computer. Now a close friend—one who would be quick to call me out—receives a report detailing my internet use each week. I don’t want to wait until the struggle commences to seek help; I’d rather take proactive steps to avoid it altogether.

Some men I talked to before getting married admitted they deleted Instagram from their phones because it was too easy to stumble across things they knew would tempt them. Others share e-mail and Facebook passwords with their wives to eradicate any secrecy in their marriage. Before my wife and I said “I do,” one pastor suggested every couple should have a standing counseling appointment every three months.

The fences will look different for each couple, but refusing to build them will leave the garden unprotected.