Changed rand for uniqid.