Here are some steps to take when you make a mistake at work and want to try to correct it.

Admit Your Mistake

As soon as you discover that something went awry, immediately tell your boss. Don’t try to hide your mistake. If you do that, you can end up looking a lot worse, and others could even accuse you of a coverup. Being upfront about it will demonstrate professionalism, a trait most employers greatly value. Some mistakes may be so severe that they cost you your job. Even if you fear you could get fired, you need to let your boss know about the mistake before it gets worse. Being proactive and honest could help you keep your job, though it isn’t guaranteed.

Present Your Boss With a Plan To Correct the Error

You will need to come up with a plan to rectify your mistake and present it to your boss. Hopefully, you will be able to put something together before you first approach them, but don’t waste time if you can’t. Reassure them that you are working on a solution. Once you know what you need to do, present it. Be very clear about what you think you should do and what you expect the results to be. Tell your boss how long it will take to implement and any associated costs. While making a mistake is never a good thing, don’t miss the opportunity to demonstrate your problem-solving skills.

Don’t Point Fingers at Anyone Else

In a team-oriented environment, there is a good chance other people were also responsible for the error. While people are typically thrilled to take credit for successes, they are reluctant to own mistakes. If you can, get everyone to approach your boss together to alert them that something has gone wrong. Unfortunately, you might not be able to make that happen. There are going to be some people who say “it’s not my fault.” It won’t help you to point fingers at others, even if they do share responsibility for the mistake. In the end, hopefully, each person will be held accountable for his or her own actions.

Apologize, But Don’t Beat Yourself Up

There’s a big difference between taking responsibility and beating yourself up. Admit your mistake but don’t berate yourself for making it, especially in public. If you keep calling attention to your error, that is what will stick in people’s minds. You want your boss to focus on your actions after you made the mistake, not on the fact that it happened in the first place. Be careful about tooting your own horn, though. Bragging about how you fixed things will not only call attention to your original blunder, it could raise suspicions that you made a mistake so you could swoop in to save the day.

If Possible, Correct the Mistake on Your Own Time

If you are exempt from earning overtime pay, then you might want to get to work early, stay late, and spend your lunch hour at your desk for as long as it takes to correct your mistake. This won’t be possible if you are a non-exempt worker since your boss will have to pay you overtime—1.5 times your regular hourly wage—for each hour you work over 40 hours per week. You certainly don’t want to stir up more trouble by forcing them to pay you extra, so get your boss’s permission if you have to work longer hours on the clock. Want to read more content like this? Sign up for The Balance’s newsletter for daily insights, analysis, and financial tips, all delivered straight to your inbox every morning!