Fix overflow issue in SubRange