Ugly Java fix for CPV codes