First step is making sure you macerate your fruit for long enough, I recommend at least 1 hour but it's better if you can do 2-4 hours. Then boil down those juices until you have a thick syrup. Make sure you add cornstarch to the filling (and that it's not expired!) and finally, make sure the pie filling is bubbling before you take it out of the oven. Also make sure to let your pie cool completely, if you cut into a warm pie the filling won't have set.