Update code to v1beta2