UniqueIDs are now written correctly.
Checks for a valid id before submitting.