Add crash prevention for impossible curvatures, fix boilerplate GPL text