fix a problem in validation