bug fix in validation checks