fix uniqueness, and a few other simple things