Correctly compare version type.
Don't assign the range type each time.