fixed bug that was making erroneous inserts into IDs collection