fixed wrong value used for range validation