There are a few things you can do to avoid a hole or crater forming in the middle of your cake. First, make sure you properly measure everything—especially the baking powder. No eye-balling measurements here! Secondly, make sure your baking powder is fresh and not past its best-by date. Third, use an oven thermometer to determine how accurate your oven is. Baking in an oven that's either too hot or too cold can cause the cake to sink in the middle.