Fixed bug in Validity

Fixed bug in Validity