//range overlapping bug fix