Fixed duplicate id bug