duplicate ids bug fixed