Fixed outsideRanges()