Fixes #7 where IDs were duplicated.