handle the error of repeated values, casued by varch