partly fix uniqueness check