Implemented the changes in ls that prevent gizmo crashes in cases where the mesh is seriously distorted