Updated diff handling