Fixed excessive pattern when range ends with 9.