a few changes for v3 upgrade