Fixed validation script