safer version comparison