Fortunately, there’s a lot you can do to fix your baking mistakes when they happen—or prevent them from happening in the first place. Follow the best tips from the pros below to ensure every recipe looks as good as it tastes.

Preventing Baking Mistakes

They say an ounce of prevention is worth a pound of cure—and so your best bet is to ward off trouble before it starts. Follow these tips to keep mistakes from happening in the first place.

Check the recipe first

Read the recipe thoroughly before you bake to make sure you understand the steps, and that there are no surprises lurking at the end. “Reading first makes the process more simple,” says couture baker Ron Ben-Israel, of Ron Ben-Israel Cakes in New York City. Be a little wary of those blog post recipes, which don’t undergo the rigorous review process that a recipe in a cookbook or from a reputable site may have. And don’t forget to read the comments—you might find additional tips there that might help you get a better result.

Prep the pan properly

There are plenty of tools out there to help your desserts slide out of the pan, such as Silpat silicone baking mats, or even a piece of parchment pressed into the bottom of the pan and generously oiled or buttered. While many recipes call for buttering and flouring a pan to prevent sticking, that combo may actually create the problem. “The problem with butter is it’s only 70 percent butterfat,” Ben-Israel says. “The water in it binds with flour and creates glue, so the cake actually sticks.” He says an oil spray may be a good option, but his secret for perfectly nonstick cakes is vegetable shortening. “Use your fingers or brush to spread it all over the pan and into the crevices, and then sprinkle white sugar and shake it until it catches on,” Ben-Israel says. “It won’t create a glue-like substance and you’ll get a nice crust on the cake.”

Measure accurately

For accuracy, it’s much better to weigh dry ingredients rather than use measuring cups, as you’ll get a more accurate result. If the recipe doesn’t offer weights (or you don’t have a scale), use the right method for measuring dry ingredients. For instance, if you’re measuring flour, you should lightly spoon or sift it into the cup, and gently level the top. “If you scoop it from the container, it’s denser, and you end up with 30 percent more than you need,” Ben-Israel says.

Use better ingredients

The quality of the ingredients can make a big difference to the quality of your final product. Ben-Israel recommends using French butter, which has a higher butter fat ratio and makes the cakes tender and moister.

Test the waters before you bake

“If I’m using someone else’s recipe, I’ll set a timer for about 20 percent less time than the recipe calls for,” says Sarah Crawford, food blogger at Broma Bakery. “So if they say to bake a cake for 25 minutes, I’ll check it at 20. “I always insert a butter knife into the center of my baked goods to test for done-ness,” Crawford says. “If it comes out clean or just slightly damp, your bake is done. It’s never failed me!” For cookies, just start by baking one or two on a pan to see how they come out before you do a full batch, Ben-Israel says. (That way, if the bake time is off, you haven’t ruined all your dough.)

Let it cool—but not too much

Cool cakes in the pan on a rack for 10 minutes to give them time to cool and shrink away from the sides. It will be easier to get out by placing a cooling rack over the top and inverting the cake onto the pan. If you’re doing a jelly roll or Buche de noel-type cake, you’ll want to shape it before it cools fully. “To keep the sponge from cracking, make sure to underbake your dough to keep it as moist as possible,” Crawford says. “I like to ‘pre-roll’ my jelly rolls. As soon as they are cool enough to the touch, I’ll roll them in a kitchen towel so that they cool in that spiral shape. Then once it’s fully cool, carefully unroll, add your filling, and roll up again.”

Don’t overdo it with whipped cream

Making your own whipped cream isn’t as difficult as you think: Just whip the cream in a chilled bowl with a tablespoon of confectioner’s sugar and perhaps a splash of vanilla extract for every cup of cream. The trick is to turn off the mixer as soon as you’ve reached the texture you want—in general, that’s when it holds a peak. “It’ll set up a teensy bit more on the pie, but not much,” says Valeri Lucks, founding partner and chief executive pie officer at Honeypie Cafe in Milwaukee, Wis.

How to Correct Your Baking Problems

Even with all the proper prep, you might end up in a sticky (or too dry!) situation. Here’s how to fix the most common baking problems, so you have something special to enjoy.

Loosen a stuck cake

For stuck cakes, run a thin knife around the edge and see if that will help loosen it. It might even help to pop it back in the oven for a bit. “If it stayed out on the counter too long, put it back in the oven for a minute, and the stuck areas might release,” Ben-Israel says.

Fix a curdled custard

Curdling happens when you try to put cold yolks into your hot custard mix—and they’ll make the texture of your finished dessert a little less than ideal. If you get curdling, a fine-meshed sieve is your best friend, Ben-Israel says. “You don’t want to press on the solids, but gently stir it instead. The curdle will stay, and you’ll get a clean custard.”

Rehydrate an overcooked cake

If your cake seems overcooked and dry, sprinkling it with a little bit of simple syrup can help add moisture back to the cake. “But just a sprinkle—otherwise, the cake can become soggy,” Ben-Israel says. While a plain simple syrup is fine, you can also get fancy with syrups flavored with liqueurs, coffee, or citrus flavors to add another flavor element to your cake along with the moisture.

Cut out the burn

Overcooked pie crust or cookies can happen fast. If you’re able to catch the damage before it gets too crispy, there are things you can do to continue baking the parts that need it, without burning the parts that are nearly done. Placing foil over the parts that are brown can help reflect away the heat. “You can lower your oven temp halfway through baking a pie to prevent over-browning,” says Lucks. If you missed that window and the top pie crust is burned or the edges look singed, don’t be afraid to do a little surgery on your pie to cut away the burned crust—or just embrace it. “You can just serve it a little burned,” says Lucks. “I personally like a little caramelization of the dough.”

Smooth overwhipped cream

If you start to see lumps and a grainy texture, you’ve gone too far with your whipping. To fix it, add in a splash or two of heavy cream, and gently whisk it in until the whipped cream gets smoother.

Retool a broken dessert

If the cookie (or cake) crumbles, all is not necessarily lost—just rethink what you do with it. Cake pops are an easy way to repurpose crumbled cake. “Simply break up your cake with a hand mixer and add frosting a quarter cup at a time until it comes together into a soft dough,” Crawford says. “Roll into balls, dip in frosting, and you have a delicious treat.” Crumbled cake can also be used in lieu of the bread in your favorite bread pudding recipe. “Follow the same recipes you use for bread pudding—just reduce the amount of sugar in the recipe overall by one-third to one-half,” Ben-Israel says. And don’t forget trifle, which involves layers of cake chunks with pudding or custard, fruit, and whipped cream. (You know that was definitely invented by some chef that had a baking disaster!)