bug fix: detect the difference in ranges

detect the difference in ranges like  “034@089a7-034@103b7” and ranges
like “034@104a1-120b7” and count it in a proper way