Spline landscape breakes mesh

I have made a landscape spline. And I want to add a skiing track to it as a mesh. I have made the mesh, and if I drop it in the world as just the basic mesh there is nothing wrong, but when I apply the mesh as a Spline mesh it breaks the mesh. It cuts of the top of the rills as shown in the picture below

Working one:

!
Broken one

I figured out what the problem was. The mesh had nanite enabled, and turning it off fixed it.