applied the same fix from Pabitra to fix the duplicate id problem