bug fix in validation