Probably because there's too much liquid in it. It also might need to bake for longer.  If you think there's too much liquid in the filling before you bake it, mix in a tiny bit of flour. If it's runny while it's baking, keep it in the oven until the center of it is set.