patches to fix duplicates track problem in upgrade geometry

patches to fix duplicates track problem in upgrade geometry