fixed duplicate id bug