If you are not in a mission and cache.instance.optimalrange is both 0 and not the same as settings.instance.optimalrange make them the same