cleanup patch metadata