Fix the range validation.