fix NumberPicker so that it doesn't exceed range