Added check if nids is unique during import