Parenting is a difficult and often thankless task even in the best of times. For those going through a difficult time in their lives, the responsibilities of parenthood can become infinitely more difficult. Divorce is one such situation.

Not only will you have more restrictive schedules and much more to remember when you have shared custody arrangements with your ex, but you also have to deal with the emotional fallout of custody exchanges for your children and watch for attempts at manipulation by your kids.

Kids may love their parents, but they also want to get what’s best for themselves, just like any other person might. Kids with divorced parents may try to manipulate them against one another to get more privileges or simply to avoid consequences for their behavior. You and your ex can prevent these kinds of parenting hardships by agreeing to certain important terms early in your shared custody situation.

You don’t have to see eye-to-eye, but you do have to agree on the rules

Even in a happy marriage, it is common for parents to disagree about the best approach to various parenting issues. After divorce, your ideas and perceptions may diverge more dramatically than they would when you lived together. You need to make sure that the rules are consistent and predictable between households.

Limiting screen time, setting a curfew, establishing expectations for school performance and agreeing on appropriate forms of discipline can all be an important part of a healthy co-parenting relationship. Committing these ideas and agreements to writing in a parenting plan will make it easier for you to work through issues as they arise.

Remember that good parents can sometimes be bad spouses

Divorce often makes it easy to become negative about your former spouse, but there were once things that you loved and respected about them. Trying to find things about their parenting that you feel they do well can be a great way to build up a positive relationship after the divorce.

Maybe they often work late, but they always make time to talk to each child individually. Perhaps they’re usually very easy going, but you know you can always rely on them to hold the line in a situation where you have to discipline your child.

Identifying those positive factors and building on them will not only help you work better together but it will also help you recover from the divorce while setting a positive example for your children about cooperating during times of stress.