check unique in modify mode