Found minor bug for uniqueness checking