Merging optimization changes