Fixed a small bug in the validation

small fix