Fix curve simplification