Fix min/max in range validation