When muffins have a flat top, it means that they have not appropriately risen. This can happen due to cold oven temperature. Make sure that the oven temperature is hot and that the oven is preheated. Moreover, make sure that the baking powder and baking soda are not expired.