Usually, overmixing the filling or overbaking the pie causes it to crack. Make sure to take your pie out of the oven when the center is set and jiggly. Also, baking it in bain-marie helps to cook evenly and prevents cracks.