Fixed validation of uniqueness.