Handle version comparisons more properly