The custard filling will turn out runny if it hasn't been cooked long enough and to the right consistency. If it's still runny after the allotted time in the recipe, cook it for an additional couple of minutes until it thickens.