fix numberBetween when max < min