Replace duplicate paths