Merge "Fix range check"