fix to the valdiation code