Handle version comparison better