Updated unique check