range min/max value fix