Fixed a problem with duplicate UIDs.