Using cooking spray to spray the baking tray or muffin pan is the best way to ensure that the pastry won't stick to the pan.