fixing uniqueness constraint on update