Fixed validation of uniqueness of records