Fixed null attribute, collapsed part of rangeInside function