Fixed a bug with random identifiers not being set correctly on elements.