Moved line to set $uid so we get a value for creation_uid