mincut sanitization patch code generation bug fix