fixing unique constraints