Fix some bugs when updating unique fields