Fix duplicate id issue