Fixing multi-added ids bug