The secret to making a perfect meringue is to make sure that your egg whites are at room temperature, and that there is no trace of yolk in the whites. Add the sugar gradually and make sure that the peaks are stiff and glossy before adding to the pie filling. Also, make sure to cover the filling completely with the meringue to avoid shrinking or weeping.