Bugfix in overlapping ranges