Fix diff generation