fixing a minor issue with exception throwing during validation.