Divorce is rarely an easy process. In addition to heightened emotions, there are many financial details to sort through that require agreement with your ex. It’s natural to start thinking about life on your own and a new beginning. For many, this includes the desire to buy a new home. If divorce puts your personal finances in disarray, you might find it challenging to qualify. Here are five tips to help you prepare for success.

1. Maintain job stability. Typically lenders require at least two solid years of employment at the same place, with income staying steady or increasing at the end of that period. Even if you hold a job and make enough money to qualify for a loan, you still might have trouble getting lender approval right away. If you’re self-employed, lenders might ask for two to three years of steady income history. If you’ve had a steady job and want to switch jobs soon, consider waiting until after you’ve closed on your new home.

2. Protect your credit. Pay all bills on time. When bills are 30 days past due, creditors can report delinquencies to the credit bureaus, which lowers your personal FICO score. Even a few late payments can drop a credit score significantly. The finalization of your divorce can impact your score as well. When joint accounts of long-standing good history get split between spouses, it’s possible each person’s credit scores will go down. If you share credit cards with your ex, make sure balances are paid off and the joint accounts are closed. If you share an auto-loan, consider selling off the vehicle to pay for the loan. Or one person can refinance the vehicle in his or her name and remove the other person’s name from the title. Don’t keep your name on a joint loan and retain liability in its payment. If you’re planning to buy a home after your divorce, keep tabs on your credit score and responsibly protect it.

3. Know your debt-to-income ratio. The Consumer Financial Protection Bureau (CFPB) states that your monthly debt, including mortgage, can’t exceed 43% of your monthly pretax income to qualify for a home loan. Lenders will look closely at your debt-to-income ratio. If you’re paying alimony or child support, it will likely be counted as additional debt beyond whatever else shows on your credit report. On the other hand, if you receive alimony or child support, you can count this money as additional income (with proof of payments received and proof they’re scheduled to continue for a certain length of time).

4. Save cash. Divorce can be costly. You might need to rebuild your savings before buying again. If you had to sell a house, you can use the proceeds as a down payment on your next home. But don’t buy a house if you’re cash poor. Besides the down payment, you’ll have inspection costs, closing costs, and moving costs. And remember, all homes require ongoing maintenance costs, not just mortgage payments. You need a cash reserve.

5. Be flexible on the type of home you can afford. If you’re in a financial position to buy, define the type of home that makes sense now and down the road. If you have children, your home needs to satisfy their needs too. Maybe you sacrifice a few features you’re used to having in order to go forward, like a spacious yard or the same neighborhood. Practicality doesn’t have to be a negative.

If buying after divorce is right for you, meet with a lender for pre-approval. This is the first step for all types of buyers and helps determine what’s affordable. Buying a new place after a divorce can provide a fresh start, but don’t jump into a purchase too soon. Sometimes waiting a couple years makes the best sense and puts you in a better position to afford what you need.