Fix range check problem for first mode range index.