fix merge path problem when empty segment being added