fix logical mistake in version comparison